Question: C++ Code : Create a class called AccountStore (shown in class diagram) to maintain an array of pointers to Account objects (from Exercise 1). Assume

C++ Code :

Create a class called AccountStore (shown in class diagram) to maintain an array of

pointers to Account objects (from Exercise 1). Assume account store has a max capacity

of 10 accounts to maintain. Provide public accessor methods to create account, get

number of accounts, get account at index, and to delete the account from the account

store. CreateAccount() and DeleteAt() functions should return the status true if

accounts created or deleted and false otherwise.

Here is Exercise 1:

A class called Account, which models a bank account, is designed as shown in the class diagram. It contains:

- Two private data members: accountNumber (int) and balance (double), which

maintains the current account balance.

- Public functions credit() and debit(), which adds or subtracts the given

amount from the balance, respectively. The debit() function shall print

"amount withdrawn exceeds the current balance!" if amount is more than

balance.

- A public function print(), which shall print "A/C no: xxx Balance=xxx

(e.g., A/C no: 991234 Balance=$88.88), with balance rounded to two decimal

places.

C++ Code : Create a class called AccountStore (shown in class diagram)

Create a class called AccountStore (shown in class diagram) to maintain an array of pointers to Account objects (from Exercise 1). Assume account store has a max capacity of 10 accounts to maintain. Provide public accessor methods to create account, get number of accounts, get account at index, and to delete the account from the account store. CreateAccount() and DeleteAt() functions should return the status true if accounts created or deleted and false otherwise. Exercise one: A class called Account, which models a bank account, is designed as shown in the class diagram. It contains: - Two private data members: accounthumber (int) and balance (double), which maintains the current account balance. - Public functions credit() and debit(), which adds or subtracts the given amount from the balance, respectively. The debit() function shall print "amount withdrawn exceeds the current balance!" if amount is more than balance. - A public function print(), which shall print "A/C no: xxx Balance =xxxcc (e.g., A/C no: 991234 Balance= $88.88 ), with balance rounded to two decimal

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!