[MSOE Homepage]

Dr. Taylor's MSOE homepage

Courses

Unix is a Four
Letter Word

My Photo Album

My Personal Homepage

CS-100 Main page

CS-100 -- Lab 3: Grade Calculator revisited

Fall Quarter 1999



Electrical Engineering and Computer Science Department
Dr. Christopher C. Taylor

S-331, 277-7339

www.msoe.edu/~taylor/

Purpose

In this lab, you extend the functionality of the Grade Calculator program that you wrote last week. The lab is designed to further your programming skills and become more familiar with the string class.

Assignment

Modify your Grade Calculator program so that it can handle multiple students. Your program should:

  1. Prompt the user to enter a student's name. (If the user enters quit, the program should output the grades for all the students entered and then quit.)
  2. Prompt the user for all of the quiz, lab, exam and final project scores for that student
  3. Calculate and display the final grade (only the final grade, not the entire table like last week) for the student
  4. Your program should also store the student's name in a string object. (If the string object already exists from a previous student, the new student's name should be appended to the end of the object.)
  5. Repeat the above steps until the user enters quit in step 1.

The program output should appear as follows:

Enter student's name: Step...
...
Please enter final project score: 75

Stephen Budiansky: 76.023

Enter student's name: Thom...
...
Please enter final project score: 100

Thomas Grose: 98.132

Enter student's name: Thom...
...
Please enter final project score: 87

Warren Cohen: 83.831

Grades entered for the following students:

Stephen Budiansky
Thomas Grose
Warren Cohen

Enter different values than the ones listed above for the example output included in your report.

Note: if you choose to use getline(), be sure to include the following two commands just prior to its use: cin.clear(); cin.ignore(1000,'\n');.

Programming consideration: It is always good in program design to consider potential modifications that may be required a some later date. Be sure to keep this in mind when designing your program.

Lab report (due 4:30pm Tuesday, October 5, 1999)

The lab report should be self-contained. That is, it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:

  • Purpose
  • Problem Statement
  • Procedure (include the steps in your design procedure, reasons for your design decisions, etc.)
  • Documented source code (you may wish to include this at the end of your report)
  • Sample program output
  • Conclusions (problems you encountered, what you learned, suggestions of how the lab could have been better, things you would have done differently, etc.)

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic Submission Guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well.

If you have any questions, consult the instructor.


This page was created by Dr. Christopher C. Taylor copyright 1999.