CS
1401 Introduction to Computer Science
Fall 2013, Lab 2
Assignment. The class syllabus describes how we assign a
grade for this class: we combine grades for the labs, for research,
for quizzes, and for exams: - 26% comes from lab
assignments
- 10% come from lab attendance and participation
- 3% come from research tasks
- 10% comes from quizzes
-
36% comes from exams, and
- 15% comes from the final exam.
Write a program that can help a student predict his grade. This
program should: - ask for a student's name, for a student's
average grades on the labs, on lab attendance, on quizzes, on
exams, and on the final exam (all on a scale form 0 to 100),
-
combine all these grades, with appropriate weights, into a final
grade, and
- print all intermediate grades -- and the final
grade; the final grade should be printed as an integer (so that
90.3 or 90.7 should be simply 90).
Example. Suppose that a hypothetical student Luc Kay-Vladik
got:
- 90 average on the labs,
- 100 average on lab
participation,
- 50 on research assignments (turned in only one
instead of two),
- 86 average on the quizzes,
- 80 average on
the tests, and
- 81 on the final exam.
Then, the final grade
is
0.26 * 90 + 0.10 * 100 + 0.03 * 50 + 0.10 * 86 + 0.36 *
80 + 0.15 * 81 = 84.45
Your program should then print the
following text:
Semester: Fall 2013
Class: CS 1401 Introduction to Computer Science
Student name: Luc Kay-Vladik
Grades for:
lab assignments (26%) 90
lab attendance (10%) 100
research assignments (3%) 50
quizzes (10%) 86
exams (36%) 80
final exam (15%) 81
Overall grade for the class: 84
When it is due. The program is due at the beginning of the
first lab section on the week of September 16, i.e.:
- on
Monday September 16 for those who attend Monday-Wednesday labs, and
- on Tuesday September 17 for those who attend Tuesday-Thursday
labs.
Caution. Please take into account that if you want to read
a string after reading a number, you should first read the end-of-line; this
"bug" of DrJava is mentioned in the book, we will show it in class, and the
TAs will emphasize it in the labs.