## Lab 4

Write a Java class named "Investment" that models a one-time
investment that earns compound interest. Your class should
have four instance variables:

- double pv; the present value (the amount that was invested)
- double r; the nominal interest rate (in decimal form)
- int t; the time in years
- int ppy; the number of periods per year (the compounding frequency)

Your class should include the following methods

- a default constructor that sets the present value to 1, the nominal rate
to 1%, the number of years to1 and the compounding frequency to 1.
- an initialization constructor with four parameters (present value,
nominal rate (in decimal form), years, and compounding frequency in that
order.
- a copy constructor.
- four setters (setPresentValue, setNomRate, setYears, setFreq).
- six getters (getPresentValue, getNomRate, getYears, getFreq, getFutureValue, and getInterest).
- toString (you may choose your own string representation).

Notice that the first four getters simply return the values of the
corresponding instance variables. The last two getters, must perform a
calculation in order to determine the value that will be returned.

Your class file should include appropriate documentation comments for the
class as a whole and for each method. The Java class implementation is worth 10
points and appropriate documentation comments are worth an additional 5 points.

### Investment Formulas

Here are the formulas for the future value (fv) and the interest earned
(I):

### Submitting Your Work

Send me your "Investment.java" file as an attachment to an email message
whose subject is "Lab04".