Question: Problem Statement: Create the UML diagram and implement Account class that contains: A private int data field named acctNumber for the account ( default 0

Problem Statement:
Create the UML diagram and implement Account class that contains:
A private int data field named acctNumber for the account (default 0)
A private double data field named balance for the account (default 0)
A private Date data field named dateCreated that stores the date when the account was created
A no-arg constructor that creates a default account
A constructor that creates an account with the specified number and initial balance
The accessor and mutator methods for the data fields acctNumber & balance
The accessor method for dateCreated
A void method named withdraw() that withdraws a specified amount from the account
A void method named deposit() that deposits a specified amount to the account
A String method named toString() that displays the date the account is created
Create the UML diagram and implement CheckingAccount, subclass of Account, that contains:
A private static data field named overdrawLimit for the account (default 500)
A no-arg constructor that creates a default account
A constructor that creates an account with the specified acctNumber and initial balance
The accessor methods for overdrawLimit
override toString() to display "Checking"
Create the UML diagram and implement SavingsAccount, subclass of Account, that contains:
A private static data field named overdrawLimit for the account (default 500)
A no-arg constructor that creates a default account
A constructor that creates an account with the specified acctNumber and initial balance
The accessor methods for overdrawLimit
override toString() to display "Savings"
Create CheckingAccount and SavingsAccount classes as subclasses of the Account class.
Write a test program titled BankAccounts.java that creates objects of Account, SavingsAccount, and CheckingAccount and invokes their toString() methods.
Your program should do the following :
start
Create an Account object
Display the description of the object
Enter the Checking Account Number
Enter the Checking Account Balance
Enter the amount to withdraw
Create a Checking Account
Display the checking account balance
Withdraw 500 from the checking account
Display the checking account balance
Enter the Savings Account Number
Enter the Savings Account Balance
Enter the amount to withdraw
Create a savings account
Display the description of the object
Display the savings account balance
Withdraw 200 from the savings account
Display the savings account balance
end
Examples for a checking account and savings account are shown below: Note: User input is in bold after each prompt
created on Sat May 1321:58:59 PDT 2023
Enter the Checking Account Number: 111
Enter the Checking Account Balance: 2000
Enter the amount to withdraw: 500
Checking
Initial Ballance: $2000.00
Withdrawing $500.00
Balance After Withdrawal: $1500.00
Enter the Savings Account Number: 222
Enter the Savings Account Balance: 5000
Enter the amount to withdraw: 200
Savings
Initial Ballance: $5000.00
Withdrawing $200.00
Balance After Withdrawal: $4800.00
Example2:
Comment out the toString() in the checking account, compile, & run again: Note: User input is in bold after each prompt
created on Sat May 1321:58:59 PDT 2023
Enter the Checking Account Number: 111
Enter the Checking Account Balance: 2000
Enter the amount to withdraw: 500
created on Sat May 1321:58:59 PDT 2023
Balance: 2000.0
Initial Balance: $2000.00
Withdrawing: $500.00
Balance After Withdrawal:$1500.00
Enter the Savings Account Number: 222
Enter the Savings Account Balance: 5000
Enter the amount to withdraw: 200
Savings
Initial Ballance: $5000.00
Withdrawing $200.00
Balance After Withdrawal: $4800.00
Problem Statement: Create the UML diagram and

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 Programming Questions!