Please 1,2,3 in java programing langauge 1. Java program to calculate the letter grades of students in
Question:
Please 1,2,3 in java programing langauge
1. Java program to calculate the letter grades of students in a course and report those grades. Your program should first ask the user to enter the number of students in the course and read that number. For each student, your program should generate a random integer number ranging from 50 to 100 to be the average score of the student. Calculate the letter grades of the students as follows[1]:
For average scores from 90 to 100, the letter grade should be "A".
For average scores from 80 to 89, the letter grade should be "B".
For average scores from 70 to 79, the letter grade should be "C".
For average scores from 60 to 69, the letter grade should be "D".
For average scores from 50 to 59, the letter grade should be "F".
Print the generated average scores and the corresponding letter grades on a separate line of output.
2. Java program to calculate the number of years required for a person to retire. Your program should generate an integer number in the range of 150,000 and 200,000 to be the retirement goal of the person. Your program should print out the generated retirement goal to the console.
The initial balance for the person should be 0. For each year, the person may contribute an amount less than or equal to $10,000. Your program should generate a random number for the contribution value. This contribution value should be added to the balance. Your program should then generate a positive double number less than 5.0 representing the percentage of the rate of return for that year, and another positive double number less than 4.0 representing the percentage of inflation. The actual gain (or the loss) should be calculated for this year as the multiplication of the balance and the difference between the percentage value of rate of return and the inflation for that year. The actual gain (or the loss) should be added back to the balance. The contribution, the actual gain (or the loss), and the new balance should be printed for each year. Your program should continue until the balance meets or exceeds the retirement goal of the person, after which, it should print the number of years needed to retire.
3. Java program to calculate the monthly payment for a loan as follows. Read the principal, interest rate and number of years from the user of your program. Using the formula below, calculate the monthly payment.
monthlyPayment = (interestRate * (principal / paymentPerYear)) /
(1 - ((interestRate / paymentPerYear) + 1) -paymentPerYear* numberOfYears)
Define paymentPerYear as a constant which is equal to 12. Your program should present the following information to the user:
The monthly payment amount
The total amount of payments made after each year
The total interest paid during the whole course of the loan.
[1] This calculation is just for practice purpose and is not related to assigning your letter grade for this course.
Mathematical Statistics With Applications In R
ISBN: 9780124171138
2nd Edition
Authors: Chris P. Tsokos, K.M. Ramachandran