
(Polymorphic Banking Program Using Account Hierarchy) Develop a polymorphic banking program using the Account hierarchy created in Exercise 19.10. Create a
pointers to SavingsAccount and CheckingAccount objects. For each Account in the vector, allow
the user to specify an amount of money to withdraw from the Account using member function debit and an amount of money to deposit into the Account using member function credit. As you
process each Account, determine its type. If an Account is a SavingsAccount, calculate the amount
of interest owed to the Account using member function calculateInterest, then add the interest
to the account balance using member function credit. After processing an Account, print the updated account balance obtained by invoking base-class member function getBalance.

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

- Objectives:Solve problem, design solution and implement using C++ Class and ObjectsLearn how to manipulate C++ arrays of objects using vector classUse C++ stream to read in data and format output Description:Define a C++ class named "Expression" that manages an expression info: operand1 (integer), operand2 (integer) and the expression operator (char). It must provide at least the following method:- toString() to return a string containing all the expression info such as 10 + 20 = 30It must NOT store the expression result as a data member because it can be calculated when needed. Write a command-driven program named "ListExpressions" that will accept the following commands:addlistalllistbyoperatorlistsummaryexit "add" command will read in the expression and save it away in the list "listall" command will display all the expressions "listbyoperator" command will read in the operator and display only expressions with that given operator "listsummary"…arrow_forwardC+++ I need help filling in missing/needed code to to do the following: Read two doubles as the forceApplied and the contactArea of a BallObject object. Declare and assign pointer myBallObject with a new BallObject object using the forceApplied and the contactArea as arguments in that order. Then call myBallObject's IncreaseForceAppliedAndContactArea() member function. Ex: If the input is 3.0 2.5, then the output is: #include <iostream>#include <iomanip>using namespace std; class BallObject { public: BallObject(double forceAppliedValue, double contactAreaValue); void IncreaseForceAppliedAndContactArea(); void Print(); private: double forceApplied; double contactArea;};BallObject::BallObject(double forceAppliedValue, double contactAreaValue) { forceApplied = forceAppliedValue; contactArea = contactAreaValue;}void BallObject::IncreaseForceAppliedAndContactArea() { forceApplied = forceApplied * 5.0; contactArea = contactArea * 5.0;…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





