Question: reate two classes a User class with user profile information ( e . g . , first name, last name, address, city, state, zip code

reate two classes a User class with user profile information (e.g., first name, last name, address, city, state, zip code and phone number). Also create an Account class that contains a Bank account number and an amount. We also need some way to connect users and accounts. Extend the Account constructor to accept a User as an argument, add getters and setters for user in Account.
What to submit:
Submit the cpp code for this probject. Included your class files and a driver program that demonstrates both classes.
Answer the following questions.
How does the code demonstrate the principal of association?
Could we have used inheritance instead, for example made Account a derived class of User? If so, what are the advantages of using association instead of inheritance in this case?
We have not created any destructor yet, but when we do, should th

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 Programming Questions!