Answered step by step
Verified Expert Solution
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:
Ask the customer for their name.
Ask the customer for their address.
Ask the customer for their Date of birth DOB
Ask the customer if they would like to open a Savings or a Everyday account. A savings account MUST have an initial deposit of $ dollar but an Everyday account does not need an initial balance.
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 A valid entry must be enforced.
Once all valid information is obtained, create a BankAccount object.
Demonstrate through the main function EACH of the ACCESSOR and MUTATOR function output.
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started