design a class named account that contains: ■ a private
design a class named account that contains:■ a private int data field named id for the account.■ a private float data field named balance for the account.■ a private float data field named annualinterestrate that stores the current interest rate.■ a constructor that creates an account with the specified id (default 0), initial balance (default 100), and annual interest rate (default 0).■ 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.■ a method named withdraw that withdraws a specified amount from the account.■ a method named deposit that deposits a specified amount to the account.draw the uml diagram for the class, and then implement the class. (hint: the method getmonthlyinterest() is to return the monthly interest amount, not the interest rate. use this formula to calculate the monthly interest: balance * monthlyinterestrate. monthlyinterestrate is annualinterestrate / 12. note that annualinterestrate is a percent (like 4.5%). you need to divide it by 100.)write a test program that creates an account object with an account id of 1122, a balance of $20,000, and an annual interest rate of 4.5%. use the withdraw method to withdraw $2,500, use the deposit method to deposit $3,000, and print the id, balance, monthly interest rate, and monthly interest.
Price Type: Negotiable
Total Proposals: 11
1 Current viewersl
16 Total views
Proposals Reputation Price offered
- 60 Jobs 32 Reviews $0 in 0 Day