Question: Create a class called AccountStore (shown below) to maintain an array of pointers to Account objects (from Exercise 1). Assume account store has a max

Create a class called AccountStore (shown below) 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() should return the index of newly created account (also the account number) and -1 if store is full and DeleteAt() should return the status true if account is deleted or false otherwise.

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

Account pointer description:

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

Account Store - number of accounts: int - accounts[10]: Account* - currentIndex: int = 0 -max_index: const int = 9; + Create Account(int balance): int (index) + Delete At(int index): bool + GetAccount(int index): Account* + GetNumberOfAccounts(): int Account - account Number: int - balance: double = 0.0 + Account(accountNumber.int, balance:double) + getAccountNumber(): int + getBalance(): int + setBalance(balance: double): void + credit(amount: double): void + debit(amount: double): void + print(): void A/C no: Xxx Balance=$XXX

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!