Question
***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***
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started