Excercise 1-CS6004 Application Development
Excercise 1-CS6004 Application Development
Exercise 1
Part 1: Online Shopping System
Write a C# Console Application based on the following specifications.
Specifications:
2. Create two derived classes called Electronics and Clothing that inherit from the Product base class.
The Electronics class should have an additional attribute:
• Brand (string): brand of the electronic product
6. Create two derived classes called CreditCardPayment and PaypalPayment that inherit from the
PaymentMethod abstract class. Implement the ValidatePayment() method in each class to validate
the payment details based on specific rules.
Part 2: Banking System
Write a C# Console Application based on the following specifications.
Specifications:
2. Create two derived classes called SavingsAccount and CheckingAccount that inherit from the
Account base class. The SavingsAccount class should have an additional attribute:
• InterestRate (decimal): interest rate for the savings account
• The CheckingAccount class should have an additional attribute:
o OverdraftLimit (decimal): maximum negative balance allowed for the checking account
4. Implement the Deposit() and Withdraw() methods in both the SavingsAccount and
CheckingAccount classes.
6. Create two derived classes called DebitCard and CreditCard that inherit from the BankCard abstract
class. Implement the MakePayment() method in each class to make a payment using the specific
type of card.