MYPROGRAMMINGLAB WITH PEARSON ETEXT
MYPROGRAMMINGLAB WITH PEARSON ETEXT
8th Edition
ISBN: 9780134225340
Author: Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 20, Problem 20.14E
Program Plan Intro

Program Plan:

  • Use the class hierarchy created in Exercise 19.10.
  • Add user interaction part by allowing users to input the amount being credited or debited.
  • Modify the information provisioning functionality by informing about the account balance after each interaction based on the account type.

Program Description:

We will have three classes Account, SavingsAccount and CheckingAccount with desired attributes and operations. We will re-use the class hierarchy created in Exercise 19.10 and make use of virtual functions for implementing credit and debit operations. Usage of virtual functions and overridden methods in the hierarchy will demonstrate dynamic polymorphism and reduce the code overhead significantly.

Blurred answer
Students have asked these similar questions
Using R language
Using R language
Using R language
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning