Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C++ using namespace std; a. Define the class bankAccount to store a bank c us

ID: 3677271 • Letter: I

Question

In C++ using namespace std;

a. Define the class bankAccount to store a bank customer’s account number and balance. Suppose that account number is type int, and balance is of type double. Your class should, at least, provide the following operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information. Add appropriate constructors.
b. Every bank offers a checking account. Derive the class checkingAccount from the class bankAccount (designed in part a). This class inherits members to store the account number and the balance form the base class. A customer with a checking account typically receives interest, maintains a minimum balance, and pays service charges if the balance falls below the minimum. Add member variables to store this additional information. In addition to the operations inherited from the base class, this class provide the following operations: set interest rate, retrieve interest rate, set minimum balance, retrieve minimum balance, set service charges, retrieve service charges, post interest, verify if the balance is less than the minimum, write a check, withdraw (override the method of the base class), and print account information. Add appropriate constructors.
In C++ using namespace std;

a. Define the class bankAccount to store a bank customer’s account number and balance. Suppose that account number is type int, and balance is of type double. Your class should, at least, provide the following operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information. Add appropriate constructors.
b. Every bank offers a checking account. Derive the class checkingAccount from the class bankAccount (designed in part a). This class inherits members to store the account number and the balance form the base class. A customer with a checking account typically receives interest, maintains a minimum balance, and pays service charges if the balance falls below the minimum. Add member variables to store this additional information. In addition to the operations inherited from the base class, this class provide the following operations: set interest rate, retrieve interest rate, set minimum balance, retrieve minimum balance, set service charges, retrieve service charges, post interest, verify if the balance is less than the minimum, write a check, withdraw (override the method of the base class), and print account information. Add appropriate constructors.
In C++ using namespace std;

a. Define the class bankAccount to store a bank customer’s account number and balance. Suppose that account number is type int, and balance is of type double. Your class should, at least, provide the following operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information. Add appropriate constructors.
b. Every bank offers a checking account. Derive the class checkingAccount from the class bankAccount (designed in part a). This class inherits members to store the account number and the balance form the base class. A customer with a checking account typically receives interest, maintains a minimum balance, and pays service charges if the balance falls below the minimum. Add member variables to store this additional information. In addition to the operations inherited from the base class, this class provide the following operations: set interest rate, retrieve interest rate, set minimum balance, retrieve minimum balance, set service charges, retrieve service charges, post interest, verify if the balance is less than the minimum, write a check, withdraw (override the method of the base class), and print account information. Add appropriate constructors.

Explanation / Answer

class checkingAccount: public bankAccount
{
   private:
       double interest, min_balance, service_charge;
public:
  
   void set_min_balance(void)
   {
       double n;
       cout<<"enter minimum balance:";
       min_balance=n;
   }
  
   void get_min_balance(void)
   {
       cout<<"minimum balance:"<<min_balance;
   }
  
   void set_interest(void)
   {
       double n;
       cout<<"enter interest rate:";
       interest=n;
   }
  
   void get_interest(void)
   {
       cout<<"interest rate:"<<interest;
   }

   void set_service_charge(void)
   {
       double n;
       cout<<"enter service_charge:";
       service_charge=n;
   }
  
   void get_service_charge(void)
   {
       cout<<"service_charge:"<<service_charge;
   }


   void check_balance(void)
   {
       if (balance < min_balance)
           cout << 1;
       else
           count <<0;
   }
  
  
   void withdraw(void)
   {
       double w;
       cout<<"balance is:"<<balance;
       cin>>w;
       cout<<"balance is:"<<balance-w;
       balance=balance-w;
   }
  
   void disinfo(void)
   {
        cout<<"name:"<<name;
   cout<<"Account number:"<<acc_no;
   cout<<"Account type:"<<type;
   }
};