Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

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

Computer Science Sep 20, 2022

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.

Expert Solution

For detailed step-by-step solution, place custom order now.
Need this Answer?

This solution is not in the archive yet. Hire an expert to solve it for you.

Get a Quote
Secure Payment