CMSC104 Section 6080 Project 1
CMSC104, Summer 2004
Programming Project 1
Grade Calculation Program
Out: Thursday, June 24, 2004
Due: Wednesday, June 30, 2004 before 11:59 p.m.
The Objective
This project is designed to give you practice writing a C program
on your own. You will also gain experience taking pseudocode
you have written and writing the corresponding code. In addition
to writing the program, you will answer several questions relating
to your project and your chosen implementation.
The Task (90 points)
Your job is to write a grade calculating program for CMSC104.
You should use the pseudocode portion of your answer for question 2
of Homework 2. As in the pseudocode,
you do not have to do any error checking of user input. In addition
to printing the average, you should also determine the letter grade that
corresponds to the numerical average based on the following scale:
90% <= A <= 100%
80% <= B < 90%
70% <= C < 80%
60% <= D < 70%
0% <= F < 60%
When figuring the letter grade, you should round the number up
if the decimal portion is .5 and above.
Sample Output
linux2[14]% gcc -ansi -Wall proj1.c
linux2[15]% a.out
Welcome to the CMSC104 grade calculation program. This
program will calculate the final average and course
grade for a student in CMSC104. Each homework is
worth 4%, each project is worth 7% and each exam is
worth 20%.
Enter the homework 1 score: 100
Enter the homework 2 score: 80
Enter the homework 3 score: 100
Enter the project 1 score: 75
Enter the project 2 score: 90
Enter the project 3 score: 99
Enter the project 4 score: 100
Enter the exam 1 score: 92
Enter the exam 2 score: 80
Enter the exam 3 score: 81
With an average of 87.28, your course grade is a B.
Thank you for using the grade calculation program!
linux2[16]%
Project 1 Questions (10 points)
You should create a text file called p1questions.txt
and type your answers to the following questions:
- Do you feel your program is robust? The project
description does not require error checking of user input,
but should it have? If so, which conditions would you
have checked for?
- Do you feel the program functions sufficiently as is?
Would you make any additional improvements to the program?
Consider the difference if the user of the program was
a student versus the instructor. Might there be a need for
different functionality?
Your answers should be in complete sentences but need not
be more than 4 or 5 sentences in length. You should submit
the text file when you submit your program.
Submitting the Program
Your program should be in a file called proj1.c.
Here is a sample submission command. Note that the project name
starts with uppercase 'P'.
submit cs104 Proj1 proj1.c p1questions.txt
To verify that your project was submitted, you can execute the
following command at the Unix prompt. It will show the file that
you submitted in a format similar to the Unix 'ls' command.
submitls cs104 Proj1