Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Assignment_2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
- public interface IParcelProcessorOnline
- {
- public abstract bool ValidateParcelPaymentInfo();
- public abstract bool HasBeenShipped();
- }
- public interface IParcelProcessorCash
- {
- public abstract void ProcessParcel();
- }
- public class OnlinePaymentOrder : IParcelProcessorOnline, IParcelProcessorCash
- {
- public bool HasBeenShipped()
- {
- return true;
- }
- public bool ValidateParcelPaymentInfo()
- {
- return true;
- }
- public void ProcessParcel()
- {
- //process if everything is ok.
- }
- }
- public class CashOnHandPaymentOrder : IParcelProcessorCash
- {
- public void ProcessParcel()
- {
- //process if everything is ok.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement