Finish the Savings class that inherits the class Account and supports display(), deposit(), and withdraw() functions. The Savings class should have an extra data member interestRate to track how much interest is generated (which we will calculate each time we make a deposit).
Add an interestRate data member that can store a decimal value (e.g. 0.05 means 5% interest)
Complete the constructor to take in an additional argument which is the interest rate and then calls the base class constructor and initializes the interest rate member.
Write display() to provide the same display results of the base Account class, BUT also show the interest rate as the last entry. We provide a cout statement in the comments that you can use to meet our format.
deposit() should first add interest and then add the value entered by the user to the balance. Each time we deposit, compute interest based on the current balance (BEFORE making the deposit) and using the interest rate data member. Add that value to the balance in addition to the deposit amount.
For example, if the current balance is 1000, an interest rate of 5% is used, and a deposit of 200 is made, then the updated balance is the old balance, 1000, plus the interest (1000*0.05), 50, and the deposit amount, 200 for a total of 1250.
withdraw() should behave the same as the Account implementation of withdraw().

class Account
{
  private:
      string customer_name;
      int accountNumber;
      string accountType;
  protected:
      double balance;  

      void displayAccountDetails()
      {
          cout<<"AccountType   : "<< accountType << endl;
          cout<<"Customer Name : "<< customer_name << endl;
          cout<<"Account Num   : "<< accountNumber << endl;
          cout<<"Balance       : "<< setprecision(2) << fixed << balance << endl;
      }

  public:
      Account(string name, int accnum, string acctype){
        customer_name = name;
        accountNumber = accnum;
        balance = 0;
        accountType = acctype;
      }
      string getName(){
        return customer_name;
      }
      int getAccountNum(){
        return accountNumber;
      }
      double getBalance(){
        return balance;
      }
      
      void setName(string name){
        customer_name = name;
      }
      void setAccountNum(int num){
        accountNumber = num;
      }
      /* DO NOT ALTER */
      virtual void deposit()
      {
          double deposit_amount;
          cout<<" Enter amount to Deposit :  ";
          cin>> deposit_amount;
          cout << endl;
          balance = balance + deposit_amount;
      }

      /* DO NOT ALTER */
      virtual void withdraw()
      {
          float withdraw_amount;
          cout << "Enter amount to be withdraw :";
          cin >> withdraw_amount;
          if(balance >= withdraw_amount)
          {
              balance=balance-withdraw_amount;
          }
          else
          {
              cout<< endl << " Insufficient Balance" << endl;
          }
  
      }

      // Display specific account info
      virtual void display() = 0;

};

// Complete - Understand this implementation of a derived class
class Checking : public Account
{
  private:
      string linkedDebitCardNum;
  public:
      Checking(string name, int accnum, string linkedCardnum) :
          Account(name, accnum, "Checking")
      {
        linkedDebitCardNum = linkedCardnum;
      }

      /* DO NOT ALTER */
      void display()
      {
          displayAccountDetails();
          cout<<"Linked Card Num : "<< linkedDebitCardNum <<endl;
      }

};


class Savings : public Account{
  private:


  public:
      // Complete the constructor and link it with the constructor of Base class 
      Savings(string name, int accnum, double intRate) 
      {

      }

      // Your code for Option 1 : Deposit 
      //   Everytime you make a deposit you also earn additional
      //     interestRate * initialBalance  (i.e. initialBalance is balance
      //                                before the deposit)
      void deposit()
      {
        //write code below this line - think about how to use
        // the deposit() function defined in Account to do the majority of 
        // the deposit work and, here, just handle the interest



      }

      // Option 2: Do you need to provide new/updated code for Withdrawal?



      // Your code for Option 3 : Display which should include the normal
      //  account info but also the interest rate after that info. 
      //  Use the following line in an appropriate place.
      //    cout<<"Interest Rate : "<< setprecision(2) << fixed << interestRate << endl;
      void display()
      {
        // write code below this line 

        
      }
      
     
};