Adding assignments
This commit is contained in:
12
Payment/CreditCardPayment.cs
Normal file
12
Payment/CreditCardPayment.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace OOP.Payment
|
||||
{
|
||||
public class CreditCardPayment : GenericPayment
|
||||
{
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
public override void ProcessPayment()
|
||||
{
|
||||
Console.WriteLine($"Processing credit card");
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Payment/PayPalPayment.cs
Normal file
12
Payment/PayPalPayment.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace OOP.Payment
|
||||
{
|
||||
public class PayPalPayment : GenericPayment
|
||||
{
|
||||
public string email { get; set; }
|
||||
|
||||
public override void ProcessPayment()
|
||||
{
|
||||
Console.WriteLine("Processing PayPal");
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Payment/Payment.cs
Normal file
13
Payment/Payment.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace OOP.Payment
|
||||
{
|
||||
public class GenericPayment
|
||||
{
|
||||
public int amount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
|
||||
public virtual void ProcessPayment()
|
||||
{
|
||||
Console.WriteLine("Processing generic payment");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user