Start NetBeans.
Create a new project called Lab12.
Create a JavaFX main class file using the class name HasanLab12.
For this assignment, you will be writing a mortgage calculator. The final output should look like the following:
You will need to take the following inputs from the user: (The letter in parentheses tells you where we'll use these items in calculations)
The loan amount (P) or principal, which is the home-purchase price plus any other charges, minus the down payment.
The annual interest rate (r) on the loan, but beware that this is not necessarily the APR because the mortgage is paid monthly, not annually, and that creates a slight difference between the APR and the interest rate.
The number of years (t) you have to repay, also known as the "term."
The number of payments per year (n), which would be 12 for monthly payments.
Declare an appropriate number of labels and textboxes to get those inputs from the user. Use the GridPane layout to organize those elements.
Write an event handler that will be executed when the Calculate button is pressed. It will calculate the monthly payment using the following formula:
(P * (r/n) * Math.pow((1 + (r/n)), (n * t))) / (Math.pow((1 + (r/n)), (n * t)) - 1)
And print the monthly payment amount in a label at the