Question: Part B Provide your C++ source code and screenshots of your program outputs. Write a class definition for a BankAccount class that contains the following

 Part B Provide your C++ source code and screenshots of your

Part B Provide your C++ source code and screenshots of your program outputs. Write a class definition for a BankAccount class that contains the following members: Member variables account ID (of the form xxxxx-xxxxx, where x is a digit) account holder name (e.g. John Joe) account balance Member methods Initialize(ID, name, balance): sets the account ID to a given ID, the account holder name to the given string, and account balance to a given number o SetHolderName(name): sets the account holder name to the given name o IncreaseBalance(amount): increases balance by the given amount o DecreaseBalance(amount): if the given amount is no more than the balance, remove it from the balance and return true; otherwise, return false o Deactivate: deactivates the account by setting the account ID to 00000-00000, holder name to the empty string, and balance to o oIsActive: returns true if the account is active and false otherwise (an account is inactive if the account ID is 00000-00000 and the holder name is the empty string o Print: displays the state of the account (values of the member variables in an organized format) o GetID: gets the account ID GetHolderName: gets the account holder name o GetBalance: gets the account balance O Implement all class member functions. Part C: The drive" program In your main write a simple program that tests the BankAccount class. The program should create a BankAccount object and invoke each of its member methods. Display the states of the BankAccount object where appropriate. By observing expected outputs from the driver program, you should obtain assurance that your class is implemented correctly

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!