Question: CODE SHOULD BE IN JAVA. Class Grades We are now going to keep track of up to 30 student names and grades for up to

CODE SHOULD BE IN JAVA.

Class Grades

We are now going to keep track of up to 30 student names and grades for up to 10 assignments.

You will need an array of strings for the student names and a two dimensional array of ints for the grades. Grades are stored as percents You will also need variables to keep track of the number of students and number of assignments already entered. Your programs should also ensure that no more than 30 students are added and no more than 10 assignments.

The program should do the following:

1. Ask for the number of students in the class.

2. Ask for the name of each student and add it to the array.

3. Clear the screen

4. NEATLY display the list of students and grades

1. This should be done neatly. Use \t to line up columns

2. You can use .size() to find the length of an assignment's name to limit its length or add more \t string myString = "hello"; cout >> myString.size(): The above will output : 5

5. Ask if you want to:

1. Add a student:

1. asks for student name and adds to array

2. asks for grades for every assignment already created and adds to two dimensional array.

2. Add an assignment:

1. Display student's name and ask for their grade

2. add grade to proper spot in two dimensional array

3. repeat for all students

3. Curve a grade

1. ask for assignment #

2. curve the grade for that assignment

4. Quit

1. exit the program.

6. unless Quit is chosen, steps 3-5 should be repeated.

add an extra option to the main menu. The idea is that we want the teacher to be able to randomly call upon a student. Specifically you are to modify the quest so that:

1.There is an extra menu item: Pick (r)andom student

2.When the user presses "r" or "R" your program will

1.Create a uniform int distribution from 0 to numStudents-1

2.randomly choose a number from that distribution

3.clear the console

4.use the randomly generatednumber to retrieve the name of the student at that index

5.display that student's name on the screen

6.pause the program until the user presses a key.

7.Return to the main menu.

Steps 1-6 above should be done in a function with the following declaration: void randomStudent(int numStudents, string studentNames[]);

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!