...

/

Challenge 3: Implement an Account Class using Polymorphism

Challenge 3: Implement an Account Class using Polymorphism

In this challenge, we'll implement an Account class along with two derived classes, Savings and Current.

Problem Statement

Write a code that has:

  • A parent class named Account.

    • Inside it define:
      • a protected double member balance
      • public void Withdraw(double amount)
      • public void Deposit(double amount)
      • public void printBalance()
  • Then, there are two derived classes

    • Savings class
      • has a private member interestRate set to
...