CSC 546: Client/Server Fundamentals
Fall 2000
HW4: Web Applications
For this assignment, you are to extend the functionality of the Web-based grade servers
developed and discussed in class. Both the teacher and student versions should be modified
to work with a grade file that contains the complete grade listings for this class. That is, for each
student, there should be 4 lines of data, the first containing their name and password, the second
containing quiz grades, the third containing homework grades, and the fourth containing
test (midterm and final exam) grades. For example,
foobar
reed 0000
5 5 5 5 5 5 5 5
100 100 100 100 100
100 100
smith 1234
3 5 4 5 3 4 3 4
80 90 95 80 65
80 70
.
.
.
|
- Copy the file student.cpp and modify the program so that
it accesses and reports grades from an extended grades file such as the one shown above.
For example, the Web page resulting from a query for smith might display:
Grades for smith
quiz grades: 3 5 4 5 3 4 3 4
homework grades: 80 90 95 80 65
test grades: 80 70
- Further modify your student grade server so that it computes a student's overall
average and reports that number. Recall that quizzes count for 10%, homeworks 40%,
the midterm exam 20%, and the final exam 30%.
In the case of quizzes only, the lowest grade is dropped. Thus, for the smith
example above, the quiz average would be ((3 + 5 + 4 + 5 + 3 + 4 + 3 + 4) - 3) / 7 = 4 = 80%.
The resulting Web page might display:
Average for smith = 77.8
quiz grades: 3 5 4 5 3 4 3 4
homework grades: 80 90 95 80 65
test grades: 80 70
- Similarly, copy the file teacher.cpp and
modify the program so that it can update the new grades file. Using a Web page
interface such as newgrades.html, the teacher should be able to use
your program to add grades of any type to a student's record.