Hi,
i am a beginner in java (just learning As and Bs of Java programming).
I have given this instruction to code this in Java but i have no idea what to do.
I'm only thinking i could use while loop and system.out.println(). But no idea how.
help?Please
Here is the instruction:
Make a Selection (1 … 5)
1. Make a Deposit
2. Make a Withdrawal
3. Show Account Balance
4. Calculate Loan Payment
5. Exit
The user will start with a 0 balance. If the user presses 1 then you will prompt the user to enter in the amount of the deposit , add it to the balance, and display the balance. If the user presses 2 you will prompt the user to enter in the amount, subtract it from the balance, and display the balance. If the user presses 3 you will display the balance. If the user presses 4 you will prompt the user to enter in the loan amount, down payment (if any), the number of months, and the interest rate (i.e. .05 for 5%). You will then calculate the monthly payment and display it. If the user presses 5 you will end the program and say “Thank you! Please come again”. After each selection, you will do the appropriate work and then display the full menu again (without the Welcome sign). The exception is if the user presses 5. Do not display the menu again.
The car payment can be calculated by:
P ( r / 12 )
-------------------------
-m
(1 - ( 1 + (r / 12 )) )
For example, a 3 year (36 month) loan of $15,000 at 7% interest would look like this:
15000 ( 0.07/ 12 )
------------------------------
-36
(1 - ( 1 + (0.07 / 12 )) )
Where
P = Loan Amount - Down payment
r = Annual Interest rate
n = Term (# of months for loan repayment. For example, a 5 year loan is 60 months)
For example, if the loan amount was 11000 and the down-payment was 1000 then the P = 10000
The interest rate was 7% so use .07
The term was 5 years so use 60
10000 * ( 0.07 / 12)
--------------------------------
(1 - ((1 + .07 / 12) ^ -60))