Question: Please write it in java (The Account class) Design an abstract class named Account.java that contains: - A protected data field id of the int

 Please write it in java (The Account class) Design an abstract

class named "Account.java" that contains: - A protected data field id of

the int type to store the account number (default 0 ). -

Please write it in java

(The Account class) Design an abstract class named "Account.java" that contains: - A protected data field id of the int type to store the account number (default 0 ). - A protected data field name of the String type to store the name of the customer. - A protected data field balance of type double to store the account balance (default 0 ). - A protected Date data field named dateOpened that stores the date when the account was created. - A protected data field transactions of type ArrayList that stores the transactions for the accounts. Each transaction is an instance of the Transaction class, which is defined as shown in next UML. - A no-arg constructor that creates a default account. - Add a new constructor that constructs an account with the specified name, id, balance, and sets the dateOpened to current date. - The accessor and mutator functions for name, id, and balance. - A accessor method to return dateOpened. - An abstract method named withdraw that withdraws a specified amount from the account and add a transaction to the transactions array list. - An abstract method named deposit that deposits a specified amount to the account and add a transaction to the transactions array list. - A method named toString() to return a string in following format: Account id: 10023 Customer name: John Smith Account opened: Balance: $1000.00 Followed by transaction list (Part 2) 10 points (Transaction class) (The Checking class) Design a subclass of Account called "Checking.java" that contains: - A constant double data field named OVERDRAFT_LIMIT. A checking account has an overdraft limit ($500) and acquires no interest. - Define and override withdraw() methods. - Define and override the toString( function to return a string in the following format: Checkings Account id: 1003 Account opened: Balance: $5000.00 Transaction list NOTE: Checking account cannot be overdrawn more than overdraftLimit. Reset balance. Part 4: (20 points) (The Saving class) Design a subclass of Account called "Saving.java" that contains: - A data filed named annualinterestRate. - The accessor and mutator functions for annualInterestRate. - A function named getMonthlyInterest ( that adds the interest to the account balance. Add the transaction to Transactions. Return the monthly interest. - Define and override the toString( function to return a string in the following format: Savings Account id: 1002 Account opened: Balance: 1000 Interest Rate: 6% Transaction list

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!