Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Name of main program: mainBank.cpp Design a bank account class (IslanderAccount) that has the following attributes: o Owners name o Account number o Account

C++

Name of main program: mainBank.cpp Design a bank account class (IslanderAccount) that has the following attributes:

o Owners name

o Account number

o Account balance

and the following member functions:

o a function that will create a new account

o a function that will deposit funds into the account

o a function that will withdraw funds from the account

o a function that will return the current balance of the account

o a function that will display the account information (owners name, account number, and current balance)

o a function that will close the account

o mutator (setter) functions

Notes:

o If a withdraw transaction with an amount that is greater than the current balance is attempted, a $25 fee is deducted from the balance and the transaction is rejected. The user is informed with a displayed message. If the account balance becomes less than zero due to such fees, the account is closed.

o The default constructor initializes the owners name to Islander, account number to 12345 and the balance to zero.

o When an account is closed, the account information is displayed and no further activities can be done to that account.

Write a program that demonstrates the IslanderAccount class. It should allow the user to create, deposit, withdraw, check balance, and/or close accounts.

Sample Run 1: Would you like to create a new account Y/N? N Exit.

Sample Run 2: Would you like to create a new account Y/N? Y

Use default Y/N? N

Enter Owners Name: Joe Smith Enter Account Number: 34567 Enter Initial Balance in dollars: 100

Enter Choice 1. deposit 2. withdraw 3. get balance 4. display account information 5. close account & exit

What would you like to do? 1 What is the amount you would like to deposit in dollars? 200

Current balance is $300

Enter Choice 1. deposit 2. withdraw 3. get balance 4. display account information

5. close account & exit

What would you like to do? 2 What is the amount you would like to withdraw in dollars? 500

Invalid amount. Transaction is rejected. Current balance is $275

Enter Choice 1. deposit 2. withdraw 3. get balance 4. display account information

5. close account & exit

What would you like to do? 5

Account information:

Owners Name: Joe Smith

Account Number: 34567

Account Balance: $275

Account is CLOSED. Exit. 

Your code should be structured into the following files:

- IslanderAccount.h

- IslanderAccount.cpp

- mainBank.cpp

- makefile

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions