write c++ code Define the class bankAccount to store a bank customer’s account number and balance. Suppose that account number is of 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. Derive the class checkingAccount from the class bankAccount. This class inherits members to store the account number and the balance from the base class. Add member variables to store minimum balance and service charges amount if the balance falls below the minimum balance as additional information. In addition to the operations inherited from the base class, this class should provide the following member functions to performs: set interest rate, retrieve interest rate, set minimum balance, retrieve minimum balance and set service charges, verify if the balance is less than the minimum balance, write a check, withdraw (override the method of the base class), and print account information. Add appropriate constructors. Derive the class savingsAccount from the class bankAccount. This class inherits members to store the account number and the balance from the base class. Along with this some additional members to a savings account that typically receives interest, makes deposits, and withdraws money. In addition to the operations inherited from the base class, this class should provide the following additional member functions to do: set interest rate, retrieve interest rate, post interest, withdraw (override the method of the base class), and print account information. Add appropriate constructors.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

write c++ code

Define the class bankAccount to store a bank customer’s account number and balance. Suppose that account number is of 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.

  • Derive the class checkingAccount from the class bankAccount. This class inherits members to store the account number and the balance from the base class. Add member variables to store minimum balance and service charges amount if the balance falls below the minimum balance as additional information. In addition to the operations inherited from the base class, this class should provide the following member functions to performs: set interest rate, retrieve interest rate, set minimum balance, retrieve minimum balance and set service charges, verify if the balance is less than the minimum balance, write a check, withdraw (override the method of the base class), and print account information. Add appropriate constructors.
  • Derive the class savingsAccount from the class bankAccount. This class inherits members to store the account number and the balance from the base class. Along with this some additional members to a savings account that typically receives interest, makes deposits, and withdraws money. In addition to the operations inherited from the base class, this class should provide the following additional member functions to do: set interest rate, retrieve interest rate, post interest, withdraw (override the method of the base class), and print account information. Add appropriate constructors.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 8 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT