Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* Mease use Netbeans/ Java thenk yuul. Write a class encapsulating the concept of an investment, assuming the investment has the following attributes: the amount

image text in transcribedimage text in transcribed

* Mease use Netbeans/ Java thenk yuul. Write a class encapsulating the concept of an investment, assuming the investment has the following attributes: the amount of the investment (p) and the interest rate (r) at which the investment will be compounded. 1. Write an Investment class including constructor, the accessors (getters) and mutators (setters), and the tostring method. 2. Assuming that the interest rate is compounded quarterly, write a method in the Investment class returning the future value of the investment depending on how many quarters we hold it before selling it, which can be calculated using the formula: p=p(1+r)n, where n= number of periods (period = quarter). 3. Also write a Main class that does the following: a) Prompt the user to Enter Principal Amount; and take the input. b) Prompt the user to Enter Quarterly Interest Rate: and take the input. c) Prompt the user to Enter \# of Quarters; and take the input. d) Print the future value of the investment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago