Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 1: (15 points) For this assignment you are required to design and implem

ID: 2359638 • Letter: P

Question

Problem 1: (15 points) For this assignment you are required to design and implement a program to manage bank accounts. There are two types of accounts, regular and business. Regular accounts have no fees, business account charges a fee for withdrawal. You are required to design and implement three classes and a main program that tests the classes. For full credit, your program must meet the following specifications: 1) (3 points) Class name: Person Member Variable/function Type Private/public Description name variable char array private Customer name Person() constructor public Default constructor Person(char []) constructor public Initializes name getname(char []) function void public Reads name, copy name into the argument 2) (4 points) Class name: Account inherits from Person Member Variable/ function Type Private/public Description actno variable int private Customer account number balance variable float private Customer account balance Account() constructor Default constructor Account(int, char []) constructor Initializes actno, name setbal(float ) function void public Sets the balance to argument, no other computations are made deposit(float) function void public Adds the argument to current balance withdraw(float) function float public Reduces the balance by the argument, returns the argument getbal() function float public Returns balance print_bal() function void public Prints the name, account number, and balance 3) (4 points) Class name Business inherits from account Member Variable/ function Type Private/ public Description chkfee variable float private Fee per check withdraw(float ) function float public Reduces the balance by the argument and chkfee and returns the argument Business() constructor public Default constructor, initializes chkfee to 0.0 Business(int, char []) constructor public Sets account number, name and initializes chkfee to 0.0 setfee(float ) function void public Set chkfee to the argument 4) (3 points) Use the main program specification given below: a. Create 2 business accounts and 2 regular accounts with zero balance b. Print the account information for business account and regular account with proper identification c. Add 1000.00 to all accounts d. Print the account information for all accounts with proper identification e. Set the check fee to the first business account to 1.00 f. Withdraw 500 from the both business accounts, then deposit 250 to both business accounts g. Withdraw 500 from first regular account and deposit 500 to the second regular account h. Print the account information with proper identification 5) (1 point) Your program must be well documented by describing the program segments. Sample output: ------------------------------------------------------------------------------- Initially: Account #1 Regular1 0 Account #2 Regular2 0 Account #3 Business1 0 Account #4 Business2 0 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- After adding 1000.00 to all accounts: Account #1 Regular1 1000 Account #2 Regular2 1000 Account #3 Business1 1000 Account #4 Business2 1000 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Finally: Account #1 Regular1 500 Account #2 Regular2 1500 Account #3 Business1 749 Account #4 Business2 750

Explanation / Answer

i had to do this exact same program for one of my assignments, good times