Question
1. In JAVA Create a new Java project reviewActivitywith a class GradesArraywith a main method. Write a program that prompts a user to enter the
1. In JAVA Create a new Java project reviewActivitywith a class GradesArraywith a main method. Write a program that prompts a user to enter the number of courses taken. For each course, get the following information from the user using a for loop : course name, course credit hours, numerical score for the course. Each of the above values should be stored in an array, names should all be stored in a names array, credit hours in a credits array, scores in a scores array. They should be added to the arrays in the same order they are askedthe first courses name should be first element in the names array, the first courses credit hours should be first element in credits array, the first courses score should be first element in the scores array. The second courses values should be the second element in the arrays, etc. There should also be a fourth array, grades. The grades array should be filled by looping through the scores array and, for each element (score) in the scores array determine its equivalent letter grade (90 -100 = A, 80 -89 = B, etc.)add that letter grade to the grades array. Finally, print to console a table with the headers Course, Hours, Score, Grade followed by their respective values in the columns beneath. Hint: arrays need to have a fixed number of items, so fix the value after you ask the user for the number of courses, as that will also be the number of items in your array.
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