Bank Inheritance Program ISC Specimen 2023 Theory
A super class Bank has been defined to store the details of the customer in a bank. Define a subclass Interest to calculate the compound interest. The details of the members of both the classes are given below: Class name : Bank Data members/instance variables : name: to store the name of the customer accNo: integer to store the account number principal: to store the principal amount in decimals Methods/member functions : Bank(...): parameterized constructor to assign values to the data members void display(): to display the customer details Class name : Interest Data members/instance variables : rate: to store the interest rate in decimals time: to store the time period in decimals Methods/member functions : Interest(...): parameterized constructor to assign values to the data members of both the classes double calculate(): to calculate and return the compound interest using the formula: CI = P(1 + R / 100) N - P, where P is the principal, R is the rate and N is the time void displ...