Question: UML Diagram and Code in Java is needed. Account, Checking, and Savings are the classes data field named id for the account (default 0) A
UML Diagram and Code in Java is needed.
Account, Checking, and Savings are the classes
data field named id for the account (default 0) A data field named balance for the account (default 0) A data field named annualInterestRate that stores the current interest rate stored as percentage (default 0) A no-arg constructor method that creates a default account A constructor that creates an account with the specified id and initial balance A constructor method that creates an account with the specified id, initial balance, and annualInterestRate The accessor and mutator methods for id, balance, and annualInterestRate A method named getMonthlyInterestRate that returns the monthly interest rate A method named getMonthlyInterest that returns the monthly interest on the balance of the account A method named withdraw that withdraws a specified amount from the account A method named deposit that deposits a specified amount to the account A toString method that displays the account id and balance UML Diagrams for two subclasses for a checking and a savings accounts. A checking account has an overdraft limit (the amount of the limit is up to you), but a savings account cannot be overdrawn. Override the toString method from the superclass to add whether the account is checking or saving. All data fields should be private and all methods should be public. It is up to you to choose the appropriate data type for the data fields. You need to make sure to use the correct formatting.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
