I was working on a very simple program (I am an English major, not a programmer), and I tried to get as far as I could but now I need help. Here is the setup:
A professor has a class with X students, and each one takes an exam. To grade all X exams, the professor randomly assigns Y exams to each student. The distribution criteria are as follows:
* No student can receive their own exams to grade
* Every student will receive Y unique exams
* All exams must be distributed an equal number of times between the students.
The program should prompt the professor for the number of students, and how many exams each should be assigned. Then he should be prompted to enter each student's unique exam code. Once this action is complete, the program should randomly assign the appropriate number of exams to each student.
Here is an example output of what I need from the program:
Number of students: 5 //prompt
Number of exams per student: 3 //prompt
Student 1 Exam Number: 12 //prompt
Student 2 Exam Number: 23 //prompt
Student 3 Exam Number: 34 //prompt
Student 4 Exam Number: 45 //prompt
Student 5 Exam Number: 56 //prompt
//OUTPUT
Student 12 will grade: 23 45 56
Student 23 will grade: 12 34 56
Student 34 will grade: 34 45 56
Student 45 will grade: 12 23 34
Student 56 will grade: 45 12 23
//END PROGRAM
Notice how each student is assigned 3 exams, each student's exam is assigned the same number of time, and no student gets their own exam. This is what I need accomplished.
The file that is attached contains code I have already started. It meets every criteria except there is no parameter that prevents a student from being assigned the same exam more than once. There is also an error when the only numbers left in the pool on the last student are the own student's number. These need to be fixed, and you can use the provided code as needed.
Also, keep in mind that the final project will be using closer to 75 students with a distribution of 12 exams to each student. Thanks.