299148 Java - Calculating interest

  • Status Closed
  • Budget N/A
  • Total Bids 1

Project Description

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.


-id: int

-balance: double

-annualInterestRate: double


+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.

Get free quotes for a project like this
Awarded to:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online