Adding assignments

This commit is contained in:
2025-08-18 10:24:52 +02:00
commit 7b723f25f6
21 changed files with 734 additions and 0 deletions

View 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
View 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
View 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");
}
}
}