In Progress

299148 Java - Calculating interest

This is yet another homework project.

Write a class named Account to model accounts. (The properties and methods of the class are shown below). Interest is compounded monthly.

Write a client account to test the Account class. In the client program, create 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 $2500, use the deposit method to deposit $3000, and print the balance and the monthly interest.

Account

-id: int

-balance: double

-annualInterestRate: double

+Account()

+Account(id: int, balance: double, annualInterestRate: double)

+getID(): int

+getBalance(): double

+getAnnualInterestRate(): double

+setID(id: int): void

+setBalance(balance: double): void

+setAnnualInterestRate(annualInterestRate: double): void

+getMonthlyInterest(): double

+withdraw(amount: double): void

+deposit(amount: double): void

The Account class contains the properties id, balance, annual interest rate, accessor methods, and the methods for computing interest, withdrawing money, and depositing money.

Please name the project "[url removed, login to view]" and save the client program (main) and the Account class in the same file, then send me both .java and .class files.

The formula to calculate the interest is:

interest = balance * (annualInterestRate / 12)

Attached is a sample demo for how the project should run and what it should look like. If you have any additional questions, please feel free to ask. Thank you.

Skills: Anything Goes, PHP

See more: project object model, java free, java and php, interest, free java, calculating, java calculate, create java object, java test questions, java account, java test program, write java file program, account class, object method, 3000 monthly, java project class, monthly 3000, project account java, methods java program, accounts java project, java project questions, questions formula, program files java, program java files, money 3000 monthly

About the Employer:
( 3 reviews )

Project ID: #2045265

Awarded to:

$5 USD in 0 days
(0 Reviews)
0.0