Write a class encapsulating the concept of an investment, assuming
that the investment has the following attributes: the name of the
investor, the amount of the investment, and the static interest rate at
which the investment will be compounded. Include a default
constructor, an overloaded constructor, the accessors and mutators,
and methods, toString() and equals(). Also include a method returning
the future value of the investment depending on how many years
(parameter to this method) we hold it before selling it, which can be
calculated using the formula:
Future value = investment(1 + interest rate )year
We will assume that the interest rate is compounded annually. Write a
client class to test all the methods in your class and print out the future
value of and investment for 5, 10, and 20 years.