Overview

For this homework you will implement an interest calculator. A video of the calculator you need to implement can be found at Video.

Notice that there are no public/release/secret tests associated with this project. In addition, you do not need to provide any student tests.

Objectives

This project is designed to help you develop your skills at defining inner classes and simple GUIs.

Grading

Clarifications

Any clarifications or corrections associated with this project will be available at Clarifications.

Code Distribution

For this project we are not providing any code (we just defined a package). We are providing an empty code distribution (available by checking out the project named InterestCalculator) so you can submit your project as usual. Feel free to add any classes/packages you understand you need. To simplify the grading process, make sure you have in the calculator package a class named InterestGUI.java. This class must have a main method that allow us to execute the calculator program.

Specifications

Interest Functions

You need to implement a GUI for a calculator that computes simple and compound interest. The formula to compute simple interest amount is:

simple interest amount = principal + (principal * (rate/100) * years)

The formula to compute compound interest amount is:

Compound Interest Amount = principal * (1 + rate/100)Years

Notice that you do not need to add the principal in this case.

Displaying Currency

To display currency you can use the NumberFormat class (part of java.text) as follows:

String formattedValue = NumberFormat.getCurrencyInstance().format(value);

where value represents the numeric value to format.

Requirements