Question: Help in Java: please include comments and output of the code after testing so I can understand. Thank you. 1. Create class Account id: int
Help in Java: please include comments and output of the code after testing so I can understand. Thank you.
1. Create class Account id: int -balance: double -annualInterestRate: double The ID of this account (default 0) The balance of this account (default 0). The annual interest rate of this account (default 0). +Accounto +Account(id: int, balance double) +getld0: int +getBalance: double +getAnnuallnterestRate0: double +getMonthlyInterestRate : double +setld(id: int): void +setBalance(balance: double: void +setAnnualInterestRate(annualInterestRate: double): void Sets a new interest rate for this account. +getMonthlyInterestO: double +withdraw(amount: double) void +deposit(amount: double): void Constructs a default account. Constructs an account with the specified ID and balance. Returns the ID of this account. Returns the balance of this account. Returns the interest rate of this account Returns the monthly interest rate of this account Sets a new ID of this account. Sets a new balance for this account. Returns the monthly interest of this account Withdraws the specified amount from this account Deposits the specified amount to this account. Create class AccountMTA Create an account with initial balance entered by user Give the user the following options 1. Deposit 2. Withdraw 3. Print Account Details 4. Exit Make sure that the balance is never negative when withdrawing The print account details will include all the information about the account such as id, balance, annual and monthly interest rate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
