0% found this document useful (0 votes)
78 views3 pages

CSCD 240 Lab 6 Basic Numeric Programming - Grade Calculator

This document describes a program that reads student score data from a file, calculates weighted averages for different assessments, and determines the student's final grade. It provides specifications for the required program structure, including three source files and use of redirection to read from a scores file. It also gives the grading breakdown and formula for calculating weighted averages and the final grade from the assessment scores. Sample input and output files are provided as examples.

Uploaded by

theomega76
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views3 pages

CSCD 240 Lab 6 Basic Numeric Programming - Grade Calculator

This document describes a program that reads student score data from a file, calculates weighted averages for different assessments, and determines the student's final grade. It provides specifications for the required program structure, including three source files and use of redirection to read from a scores file. It also gives the grading breakdown and formula for calculating weighted averages and the final grade from the assessment scores. Sample input and output files are provided as examples.

Uploaded by

theomega76
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CSCD 240

Lab 6
Basic Numeric Programming - Grade Calculator
Write a program that reads in Assignment scores, Lab scores, Exam scores, Quiz scores and final exam
score from a file, named scores.txt via redirection and then produces a weighted average. The
weighted average will be based on what percent each of the stated categories. When the percentages of
each category are added, they total 100%. All scores will be given on a percentile (0-100) basis.

Presume the following about each category:

Assignments

Total of 5
25% of the course grade

Labs

Total of 9
20% of the course grade

Quizzes

Total of 6
15% of the course grade

Exams

Total of 3 including final


40% of the course grade
Input File Format

The first line in the file will be the student name (first name space last name). On the next line the
Assignments scores, white space separated. Next line the Labs scores white-space separated. Next line
the Quiz scores white space separated. Last line the exam scores with the last score being the final exam.

Sample input file:

Stu Steiner
90 85 88 100 30
89 95 85 75 85 90 95 55 90
99 100 98 76 80 85
56 85 95

You may presume a correctly formed input file. Once the file has been read, report the percentage
earned in each category followed by the weighted percentage. In addition, report the Grade Point for the
course based on the following formula:

4.2 - (( 100 - Avg. Percentile Score) / 12)

Sample Run

Student Name: Stu Steiner

Assignments Scores: 90 85 88 100 30


Assignments Average 78.6%

Lab Scores: 89 95 85 75 85 90 95 55 90
Lab Average 84.3%

Quiz Scores: 99 100 98 76 80 85


Quiz Average 89.7%

Exam Scores 56 85 95
Exam Average - 78.7%

Your weighted percentage is: 81.5%

Your final grade is: 2.7


Specifics

You must use a 3 file format


Name your files gradeCalculator.h, gradeCalculator.c, gradeTester.c
gradeCalculator.h will contain function prototypes
gradeCalculator.c will contain the functions used to do the necessary calculations
gradeTester.c will contain main() which will call the functions needed to do the
calculations.
You must use static arrays
You must use redirection if you use a FILE * you will receive 0 points
All input scores will be integer values
Main will contain your array declarations, variable declarations and method calls. You will do
no printing or processing in main only function calls.

To Turn In

A zip file containing:

Containing all files necessary to compile and grade your code


Include comments at the top of your source file that has your name, a description of the program,
and a list of known but unsolved problems (if any).
Your input files used to test
A screen capture named cscd240lab6out.txt
A Makefile with a target of lab6

Your zip will be named your last name first letter of your first name lab6.zip (Example: steinerslab6.zip)

You might also like