Your cart is currently empty!
Reminders: Submit your java file name EXACTLY as specified (GradeCalculator.java) using the ‘Assignments’ link of the course conneX site. ** Don’t forget to follow the Style Guidelines posted – this is part of the requirements of every assignment. It is OK to talk about your assignment with your classmates, and you are encouraged…
Reminders:
Submit your java file name EXACTLY as specified (GradeCalculator.java) using the ‘Assignments’ link of the course conneX site. ** Don’t forget to follow the Style Guidelines posted – this is part of the requirements of every assignment.
It is OK to talk about your assignment with your classmates, and you are encouraged to design solutions together, but each student must implement their own solution. We will be using plagiarism detection software on your assignment submissions.
Learning Outcomes:
When you have completed this assignment, you should understand:
Assignment Description:
The teaching team needs some help calculating grades for CSC 110 at the end of term. This assignment requires you to implement a Grade Calculator that will take a raw set of student marks from the term and generate a final grade report.
The input file contains a unknown number of lines, where each line is a single student’s set of marks.
Each line is comprised of the student’s marks for the term (separated by white space) formatted as follows:
Labs A1 A2 A3 A4 A5 A6 A7 Midterm1 Midterm2 FinalExam
The corresponding max grade of each component of the course is:
5 10 10 10 10 10 10 10 20 35 110
The corresponding weight of each component of the course as a percentage is:
5 4 4 4 4 4 4 4 15 15 37
EXAMPLE:
the following sample line entry… | ||||||||||
5 | 10 | 10 | 9 | 10 | 10 | 10 | 13 | 20.25 | 34.5 | 105 |
would calculate the following weighted values:
5.0 4.0 4.0 3.6 4.0 4.0 4.0 5.2 15.1875 14.785714285714286 35.31818181818182
and the sum of those weighted values would be: | 99.0913961038961 |
if we cast this total sum to be an int (which will take the floor of the final result) the final grade percentage for this sample line would be: 99
The final grade percentage is >89 and therefore converts to: A+
NOTE: follow letter grade breakdown on your CSC110 course outline
Programming Problem Description:
Your program must include the methods outlined on Page 4 of this document and your algorithm should include the following steps…
(see required method list on page 4)
A Sample Run is provided on the following page.
Sample input and output files are also provided as attachments to the assignment in grades.txt and corresponding gradeReport.txt
Output file opened in plain text editor:
Required Methods
You may and SHOULD add additional methods to the following but your implementation MUST include the following method signatures EXACTLY in order to be graded.
/*
* | INPUT: | File fIn, file | with | text |
* | OUTPUT: | returns number | of lines in the file as an integer | |
*/ | fIn) | |||
public static int getNumEntries(File |
/*
*
*
INPUT:
OUTPUT:
int[] values, array of integers none
*/
public static void print(int[] values)
/*
*
*
INPUT:
OUTPUT:
int[] values, array of integers returns the min value as an integer
*/
public static int min(int[] values)
/*
*
*
INPUT:
OUTPUT:
int[] values, array of integers returns the max value as an integer
*/
public static int max(int[] values)
/*
* INPUT: int[] values, array of integers
*/
public static int avg(int[] values)
/*
* | INPUT: | for an array of integers |
* | int[] grades, array of grades as integers | |
* | OUTPUT: | returns the letter grades in a String array |
*/ |
public static String[] getLetterGrades(int[] grades)
/*
*/
public static int[] countGrades(String[] grades )