On This Page
Overview
During this assignment, you will:
- Calculate your grade for this course
- Use arrays to store data
- Read data from text files
- Write a report to a text file
Background Information
Grades are calculated by dividing the total actual points by the total possible points within each assessed area. These numbers are usually expressed as a percentage. For example, we may have 10 exercises worth 10 points each, or 100 points total. Your actual score on the exercises may add up to 95 points. Thus, your total exercise score is 0.95, or 95%.
Since there are multiple areas of assessment, you must calculate the percentages for each area and multiply the percentage times the weight for that area. Continuing our example, exercises may be worth 15% of the total grade. Thus the weighted percentage is 0.95 * 0.15 = 0.1425.
To arrive at your total score, you sum the weighted percentages of each area.
Note the following information about scores and grading:
- All the evaluation areas and weights are on the Course Information page.
- Since you have not taken the final exam yet, your final grade will be different than your score to date.
- Each individual item in some assessed area may have different possible scores. For instance, assignment 1 has a possible score of 10 while assignment 2 has a possible score of 20. Thus, for every item you must consider data for both possible scores and actual scores.
- The lowest exercise score is dropped in determining the weighted percentage for exercises.
- It is possible to earn more credit on an assignment, at least in this course, than the maximum score. This is accomplished through extra credit and helps students make up for problems on any one assignment.
- The scores in one evaluation area cannot influence the scores in another. For instance, if you have 105% on your assignment scores, you cannot apply the extra 5% toward the total score.
- All your score data is in WebCT.
^ top
Specifications
Create a grade calculation application that reads your scores from text files, named as specified below, and then calculates and reports your grade for this course. Use the GradeBook.java starter code to begin the development of your application.
Sample Input Files and File Format
You must use the following file names and format. Also, I will use these files to test your code (among others):
File Format: note that the first line of the file is the total possible points for an assessed area. The entries that follow are the scores for each individual item (such as an assignment).
Sample Output
Write a report like the following to an output file named grade.txt. After writing the file, display it to the console. Do NOT use a JOptionPane for this assignment.
Weighted Scores:
Assignments: 0.3 / 0.3
Exercises: 0.12 / 0.15
Midterm: 0.17 / 0.2
Final Exam: 0.0 / 0.35
Sum of percentages: 0.59
Letter grade to date: F
Total excluding final: 0.9076923076923076
Letter grade no final: A
Note that this report was produced by the Sample Input Files provided above. You may change the number of decimal places displayed, but always show at least two decimal places.
Required Functions
You must code the following functions exactly as specified, though you may add more functions if you like.
/**
* Load the scores from the fileName into data[].
*
* @param fileName The name of the file.
* @return The array in which the data is loaded.
* @throws IOException If an input exception occurs.
*/
public static double[] loadScores(String fileName)
/**
* Calculates the weighted percentage of the data where data[0] is
* the maximum possible for all scores and each subsequent item is
* an individual score. Also makes sure that the score does not
* exceed 100%.
*
* @param data The array in which the data is loaded.
* @param weight The weight to apply to the data percentage.
* @return The weighted percentage.
*/
public static double calcScore(double data[], double weight)
/**
* Outputs the grade calculations in the specified format.
*
* @param weightedScores The weighted percentages of all areas.
* @param fileName The file name to write the report to.
* @throws IOException If an input exception occurs.
*/
public static void report(double[] weightedScores, String fileName)
/**
* General purpose method to convert percentage to letter grades
*
* @param percentage The percentage to convert
* @return A character representing the letter grade for the score
*/
public static char toLetterGrade(double percentage)
Additional Specifications
- The name of the program source code file must be
GradeBook.java.
- You must turn in four data files containing your data in the specified file format:
asn.txt: all your assignment score data
exer.txt: all your exercise score data except the lowest
final.txt: your final exam score data
mid.txt: your midterm score data
- The lowest exercise score must be removed from your
exer.txt file
- Since you have not taken the final exam yet, your
final.txt file must contain just two lines with a single number 0 on the line (exactly like the supplied file).
- All input must be from files (do NOT code any user input statements).
If you use a JOptionPane, or other user input statement, in your program you will get a low score.
- Report numerical results using at least two decimal places.
- Do not forget to document all the code. Though I have put a few comments in the starter code, you are responsible for the accuracy and completeness of the final comments.
^ top
Extra Credit
The following are worth extra credit points:
- Complete the assignment using pair programming. (1 point)
- Add code that returns the score you need to achieve on the final exam to get an "A", "B" and "C" grade in the course. For example, for the data provided, you should display: (1 point)
Score needed on final for A: 88.57142857142858
Score needed on final for B: 60.00000000000002
Score needed on final for C: 31.428571428571427
Make certain that your README.txt file describes any extra credit attempted.
^ top
Grading Criteria
The instructor will evaluate your assignment using the following criteria. Each criteria represents a specific achievement of your assignment and has a scoring guide. The scoring guide explains the possible scores you can receive.
Some scoring guides have a list of indicators. These indicators are a sign of meeting, or a symptom of not meeting, the specific criterion. Note that a single indicator may not always be reliable or appropriate in a given context. However, as a group, they show the condition of meeting the criterion.
For information on grading policies, including interpretation of scores, see the course information page.
Program Compilation
- 4: Source code compiles with no errors or warnings
- 2: Source code compiles with warnings
- 0: Does not compile or wrong file turned in
Functionality
- 10: Demonstrates mastery of the assignment
- Has extra features or demonstrates techniques beyond the assignment
- Applies concepts from the lesson(s) appropriately
- Meets all specifications (see above) with particularly elegant solutions
- No errors encountered during operation
- 8: Has all the functionality expected of the assignment
- Demonstrates many techniques from the lesson
- Meets all specifications (see above)
- Implementation seems more complicated than necessary.
- May have one minor error
- 6: Has most of the functionality expected of the assignment
- Demonstrates some techniques from the lesson
- Meets all but one of the specifications (see above)
- Implementation seems excessively complicated.
- May have 2-3 minor errors
- 4: Has some of the functionality expected of the assignment
- Demonstrates some techniques from the lesson
- Meets at least 1/2 of the specifications (see above)
- Implementation seems excessively complicated.
- May have more than 3 minor errors
- 2: Serious functional problems but shows some effort and understanding
- Meets less than 1/2 of the of the specifications (see above)
- Has a major error or many minor errors
- Implementation seems very convoluted
- Demonstrates few techniques from the lesson
- 0: Does not execute or no specifications met
Code Documentation
- 4: Code is well-documented
- 3: Code has minor documentation errors
- Has 1 documentation error
- 2: Code has some documentation errors
- Has 2-3 documentation errors
- 1: Code has many documentation errors
- Has more than 3 documentation errors
- 0: No apparent attempt to document code
REAME.txt File
- 2: README.txt file submitted with specified information included
- 1: README.txt submitted but some information was not included
- 0: No README.txt submitted
Maximum Score: 20, plus extra credit
^ top
What to Turn In
Submit your assignment following the instructions for homework. Include the following items for grading:
README.txt file
- All source code needed to make your program function.
- Four data files containing your grade information as follows and in the specified file format:
asn.txt: all your assignment score data
exer.txt: all your exercise score data except the lowest
final.txt: your final exam score data
mid.txt: your midterm score data
- Any other file needed to make your program function
You must submit all the files needed to make your assignment function properly. Do not assume that the instructors has any files unless explicitly stated by the instructor. Your assignment must work as submitted.
^ top
Home
| WebCT
| Announcements
| Schedule
| Expectations
| Course info
Help
| FAQ's
| HowTo's
| Links
Last Updated: October 29 2004 @16:42:15
|