Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***Please use java code for the question below*** Write a program that calculates the future value of a given investment at a given interest rate

***Please use java code for the question below***

  1. Write a program that calculates the future value of a given investment at a given interest rate for a specified number of years. The formula for this calculation is:

value = investmentAmount * (1 + monthly interest rate)years*12

Use text fields for the user to enter the numbers (Investment Amount, Number of Years, and Annual Interest). To get/load data from the textbox, (in this case doubles) use the following structure: (bold are identifiers you chose)

double incomingdata = Double.parseDouble(textboxName.getText());

Add a button called Calculate that will display the value (future amount) in a text field when clicked. You can use any pane you desire. The logic portion is easy (formula is given) start with the layout and figuring out what is required (some labels, some text boxes, button, etc.). Draw it out on paper, figure out where everything goes program (just the nodes) and adjust to get the layout you are happy with. Then, you can add the listener/handler using implements and override. Also, generally, it is cleaner to import only what you need, vice doing a * (wildcard) but, ensure you have imported the right stuff.

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 Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

What is a random variable?

Answered: 1 week ago

Question

What is the difference between absolute and relative pay?

Answered: 1 week ago