Question: Design a class named Account that contains: -private int data field named id for the account (default 0) -private double data field named balance for
Design a class named Account that contains:
-private int data field named id for the account (default 0)
-private double data field named balance for the account (default 0)
-private double field named annualInterest Rate that store the current interest rate(default 0) Assume all accounts have the same interest rate
-private Date field named dateCreated that store the date when the account was created.
-default constructor that creates a default account
-constructor that creates a account with the specified id & initial balance.
-Accessor & mutator methods for id, balance, & annualInterestRate
-Accessor method for dateCreated
-Method named getMonthly InterestRate( that returns the monthly interest rate
-Method names getMonthlyInterest() that returns the monthly interest
-method named withdraw that withdraws a specified amount from the account
-method named deposit that deposits a specific amount to the account
-Write a test demo program that creates an Account object with an ID of 1122, a balance of $20,000.00, & an annual interest rate of 4.5%.
-Use the withdraw method to withdraw $2,500 & use the deposit method to deposit $3,000, $ print the balance, the monthly interest, & the date when this account was created.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
