Question: Class Grading Simulation: we will be simulating test scores and homework scores for students, curving the individual test scores, determining if we need to offer
Class Grading Simulation: we will be simulating test scores and homework scores for students, curving the individual test scores, determining if we need to offer extra credit, and reporting final averages for all students.
(15 points) We will be simulating students by using three arrays for 100 students. o The first array holds their name (1 per student) o The second array will hold their homework scores (6 per student) o The third array will hold their test scores (3 per student)
(15 points) Initialize the Arrays using the following instructions: o The name array should be initialized using random first names and random last names in the format LastName, FirstName (like we did in class) o The homework score array should be initialized using random integers between 60 and 100 for each student o The test score array should be initialized using random numbers between 60 and 100
(30 points) For each exam, determine if there needs to be a curve and do something about it if necessary. o A curve is necessary if the average of the scores for that test is below 75. If a curve is necessary, add the curve to the test scores and report the curve (if no curve, necessary report that as well)
(20 points) Determine if there needs to be homework extra-credit offered. o Extra credit is necessary if and only if the average of all non-zero homeworks for all students is less than 75 o If extra-credit is necessary, determine how much (75-average)*2 and offer it. You should assume that only some people will do it, so add to everyones last homework a random amount of extra credit between 0 and (75-average)*2. o If extra-credit was necessary, report how much was offered, otherwise report none was necessary.
(20 points) Report the results of the simulated class! o Calculate the final grade for each student using the grading of this class (15% for test1, 25% for test2, 30% for test3) and 30% for the homework average o Report the final score for each student on its own line similar to: LastName, FirstName: SCORE o Print a blank line and then report the frequency (percentage using %) of each final grade in the class. Hint: Determine how many of each grade and divide that by the number of grades (100) and then multiply by a 100 (percentage).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
