Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this question we are going to create a BankAccount class, a PARTIAL class diagram is given below. In addition to the given Instance variables

For this question we are going to create a BankAccount class, a PARTIAL class diagram is given below. In addition to the given Instance variables and instance methods, your BankAccount class MUST have ACCESSOR and MUTATOR functions for all of the Instance variable.
BankAccount
- customerName : String
- DOB: String
- address: String
- balance: double
- type: String
+ deposit( double) : void
+ withdraw( double) : void
Beside the BankAccount class, your program also must implement a separate Test class through which, you will do the following tasks:
1. Ask the customer for their name.
2. Ask the customer for their address.
3. Ask the customer for their Date of birth (DOB).
4. Ask the customer if they would like to open a Savings or a Everyday account. A savings account MUST have an initial deposit of $100 dollar but an Everyday account does not need an initial balance.
5. Based on the customer choice, your program will ask the customer for their initial deposit. Make sure to implement appropriate validation technique for the initial balance based on the criteria mentioned in Step 2. A valid entry must be enforced.
6. Once all valid information is obtained, create a BankAccount object.
7. Demonstrate through the main function EACH of the ACCESSOR and MUTATOR function output.
8. Demonstrate the deposit and the withdraw function and display the balance after each of the transaction.

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

1. Who is responsible for resolving this dilemma?

Answered: 1 week ago