Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Instructions Grading on the curve is a method of grading that is based on the belief that letter grades for any given class should be
Instructions Grading on the curve is a method of grading that is based on the belief that letter grades for any given class should be distributed along a bell curve. Typically, after a test is marked, the average score becomes an "average" grade, possibly a C- or B+. Scores falling above and below this average are graded accordingly. While this method of grading has both proponents and opponents, we are going tp (pretend to) apply this form of marking to a set of assignments. You will receive a set of integer scores for a particular assignment. As grades are determined by where they lie on the bell curve, we are interested in finding the minimum grade needed to be in the top X% of marks. For example, if we grade on the bell curve, the top 20% of these marks will receive the grade 'A'. You are to determine the minimum grade required for a student to be in the top X% on the assignment. Write the body of the program. Details Input The program reads the following: an integer X representing the precentile mark that we are interested in for this data set an integer N representing the number of student marks in the data set (to follow) a data set consisting of Ninteger scores obtained by students on an assignment Processing Note that the main method has been provided for you. You are to write a method called calculate Minimum Mark that takes in an array and integer XJ percentile. The method should determine the minimum mark required (based on the array data provided) to be in the top X percent of that data set. Output The calculate Minimum Mark method should return the minimum mark that was calculated. This will be output in the main method. Sample input/output: Sample input Sample output 20 10 31 32 33 34 35 36 37 38 39 40 In the example above, the 20 is X, and the 10 is N. Note that there are 10 scores in the input. That means that to be in the top 20% of grades, you must be one of the top 2 marks. The minimum grade you can have to be in the grade group is 39. import java.util.*; public class PoD { //PLEASE START YOUR WORK HERE //PLEASE END YOUR WORK HERE public static void main(String[] args) { //Instantiate new scanner to read from the console. Scanner in = new Scanner( System.in); //Declare and initialize variables int percentToFind = in.nextInt(); final int N = in.nextInt(); int[] gradeData = new int[N]; //Obtain grade data set for (int i=0; i<>
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