Question: (in c++) Create a class and name it Person, this class should include the following data members: Last name First name Zip code. Choose a

(in c++)

Create a class and name it Person, this class should include the following data members:

Last name

First name

Zip code.

Choose a proper data type for each member. Include a default constructor that initializes last name, first name, and zip code. Also include an argument constructor. Include a function to display the data members.

Create another class and named SavingAccount. Provide fields for the customer (use the Person class), accountNumber and balance. Provide two constructors, a default constructor and an argument constructor. Include a function that displays an accounts data fields.

Include the following methods as member of the SavingAccount class: Deposit and Withdraw methods, each method has an integer argument and should update the balance member.

Instantiates two SavingAccount objects using both constructor and test all the methods. Also, use Member Initialization List (MIL) whenever its possible. Make sure to include destructors for both classes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!