CS150 Fall 2001

Final Programming Project

General Notes :


Phase 1 (20 Points) Due: Tuesday, November 27 by 2:45pm

Develop a class to represent a CS150 Student. Name the class CS150Student. Each student object will have the following eight (8) data members: id number, first name, last name, quiz1, quiz2, final, total lab score, and total project score. The id number will be a 4 digit integer, the first and last name should be strings (or cstrings) and values for all scores will be between 0 and 100. (Note no range checking is needed - assume valid entries will be made for each field).

You must also provide member functions that do the following:

Write a main function (contained in a separate source file named lastNameP6.cpp) that tests all aspects of your class. Write a main that does at least the following:


Calculating the weighted score:
The member function average() should compute the weighted average and return this value

the final test score is worth twice the quiz scores, therefore, there are 400 points possible for tests
divide the sum of the test scores by 400 to get a percent of the total
next multiply this percentage by .55 (weight of score) to get testScore component
testScores = ((q1 + q2 + 2 * final) / 400.00 ) * 0.55 //integer division here can cause hard to find problems
ex: q1 = 50; q2 = 50; final = 50 -> (200/400.00) * 0.55 = 0.275

For the lab and project component make a similar calculation.
each of the 14 labs are worth 5 points for 70 points total
the projects will be worth 140 points
workScores = ((labTotal + projectTotal) / 210.00 ) * 0.45
ex: labTotal = 35, projectTotal = 70 -> (105/210) * 0.45 = 0.225

add these two scores together and multiply by 100 to get a number between 0 and 100
ex: (0.275 + 0.225) * 100 = 50 percent


letterGrade:
The member function letterGrade(double avg) should compute the letter grade based on the weighted average and return this value as a char.

90 - 100 -> A
80 -  89 -> B
70 -  79 -> C
60 -  69 -> D
59 -   0 -> F


Sample Program Run: (user input in bold)

assume the program has declared four objects (s1, s2, s3, s4) and initialized them as follows.
s1 - using the default constructor
s2 - using the 3 arg constructor with (4321, "Kelly", "Jones")
s3 - using the 8 arg constructor with (8712, "Jade", "Stone", 82, 72, 94, 68, 126)
s4 - using the 8 arg constructor with (2379, "Ryan", "Wong", 82, 74, 73, 55, 102)

Enter data for student number 1
Enter Id number, First name, and Last Name: 8322 Audrey Brill
Enter scores for mid1, mid2, final, labs, projects: 76 76 82 58 90
Enter data for student number 2
Enter quiz1, quiz2, final, lab total, project total 88 81 78 55 80

//program output
idNum          name     mid1  mid2  final  labs  proj  average  grade
 8322     Audrey Brill    76    76     82    58    90    75.16    C
 4321      Kelly Jones    88    81     78    55    80    73.62    C
 8712       Jade Stone    82    72     94    68   126    88.60    B
 2379        Ryan Wong    82    74     73    55   102    75.17    C

NOTES:


Phase 2 (10 Points)

For phase two you will need to declare an array to hold CS150Student objects. The array will be filled by reading values from a file. Override the extraction (>>) and the insertion (<<) operators and then use them when reading from the file and sending output to the screen.. You must also make Correct use of the const modifier. Once the records are read from the file, print a report containing all data from the file as well as the average and letter grade for each student. See sample dialog below (user input in bold).

enter file name: data.txt
idNum          name     mid1  mid2  final  labs  proj  average  grade
 6789     Robert Smith    62    69     72    60    72    66.10    D
 5557        Bob Smith    92    82     84    65    92    80.67    B
 6783       Jill Kelly    62    49     62    60    65    59.10    F

Phase Two NOTES:


Phase 3 (10 Points)

For phase three, the user will be able to perform various operations on the student data, through a menu-driven interface. There should be a menu option for each of the following:

Phase Three NOTES:


Phase 4 (20 Points)

Add the following functionality to the program and add them as menu choices menu.

Phase Four NOTES:


What to submit - submit your final project as follows:

Paper copies:

Electric Copies:

lastNameFinal Project folder
CS150Student.h Header file containing CS150Student class interface
CS150Student.cpp Source file containing CS150Student class implementation
LastNameFinal.cpp Source file containing main and supporting functions