Please see the attached file. that is the assignment.. Better to be done in plain Java and not fxml.. but if it can be done with fxml cheaper, I will take that too :) Description Implement a compound...

Please see the attached file.

that is the assignment.. Better to be done in plain Java and not fxml.. but if it can be done with fxml cheaper, I will take that too :)

Description Implement a compound interest calculator using JavaFX (see Fig. 1). The calculator should take the necessary information from the user: the principal ($), annual interest (%), compounding frequency (monthly, quarterly, semi-annually, or annually), and number of years. When the user clicks the Calculate button, the table view and bar chart should display the balance growth over the years (see a demo in the lecture on Oct 21). The formula to calculate a compound interest is as follows (https://en.wikipedia.org/wiki/Compound_interest): where: I is the interest P is the initial principal r is the annual interest rate n is the compounding frequency: 12 (monthly), 4 (quarterly), 2 (semi-annually), or 1(annually) t is the number of years For example: P = 1000, r = 5%, n = 1 (annually), t = 5 years Year Opening Interest Closing Interest calculation per year (t = 1) Balance Balance 1 1,000.00 50.00 1,050.00 1000 * (1 + 0.05)^1 – 1000 = 50.00 2 1,050.00 52.50 1,102.50 1050 * (1 + 0.05)^1 – 1050 = 52.50 3 1,102.50 55.13 1,157.63 … 4 1,157.63 57.88 1,215.51 … 5 1,215.51 60.78 1,276.29 1215.51 * (1 + 0.05)^1 – 1215.51 = 60.78 P = 1000, r = 5%, n = 2 (semi-annually), t = 5 years Year Opening Interest Closing Interest calculation per year (t = 1) Balance Balance 1 1,000.00 50.62 1,050.62 1000.00 * (1 + 0.025)^2 – 1000.00 = 50.62 2 1,050.62 53.19 1,103.81 1050.62 * (1 + 0.025)^2 – 1050.62 = 53.19 3 1,103.81 55.88 1,159.69 … 4 1,159.69 58.71 1,218.40 … 5 1,218.40 61.68 1,280.08 1218.40 * (1 + 0.025)^2 – 1218.40 = 61.68 Fig. 1: Compound interest calculator. Software Design (Qualities of Code) • There should be a separation of concerns in your software design – a main class that interacts with the user and other class(es) that perform the calculations and are reusable in other client applications. • Aim to write short and meaningful methods. • Avoid duplicated statements when possible. • Follow the Java naming conventions consistently and choose your variable, method, and class names well.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here