Question: 7.2 Assign grades Write a program that reads student scores, gets the best score, and then assigns grades based on the following scheme: Grade is

7.2 Assign grades Write a program that reads student scores, gets the best score, and then assigns grades based on the following scheme: Grade is A if score is best 10 Grade is B if score is best 20; Grade is C if score is best 30; Grade is D if score is best 40; Grade is F otherwise.

The program prompts the user to enter the total number of students, then prompts the user to enter all of the scores, and concludes by displaying the grades. Here is a sample run:

Enter the number of students: 4 [Enter] Enter 4 scores: 40 55 70 58 [Enter] Student 0 score is 40 and grade is C Student 1 score is 55 and grade is B Student 2 score is 70 and grade is A Student 3 score is 58 and grade is B

7.10 Find the index of the smallest element Write a method that returns the index of the smallest element in an array of integers. If the number of such elements is greater than 1, return the smallest index. Use the following header: public static int index0fSmallestElement(double[] array)

Write a test program that prompts the user to enter ten numbers, invokes this method to return the index of the smallest element, and displays the index.

Note: Create 2 separate classes for this program. One class contains the calling code (in the main() method) and the other contains the method called.

7.15 Eliminate duplicates Write a method that returns a new array by eliminating the duplicate values in the array using the following method header: public static int[] eliminateDuplicates(int[] list). Write a test program that reads in ten integers, invokes the method, and displays the result.

Here is the sample run of the program: Enter ten numbers: 1 2 3 2 1 6 3 4 5 2 Enter The distinct numbers are: 1 2 3 6 4 5

Note: Create 2 separate classes for this program. One class contains the calling code (in the main() method) and the other contains the method called.

NEEDED ASAP THANK YOU

PROGRAMMING LANGUAGE IS C++ JAVA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!