COSC 1304 Assignment #2 Due Sept. 19, 2018.
Write a program to compute the grade earned by a (one) student.
The program will initially request 6 assignment, 2 test, and 1 final examination scores. All scores are out of 100. Your program should input all scores first, then determine whether all scores are within legal range. If any input score is out of range (negative or above 100), output an error statement. One error statement is enough irrespective of how many illegal scores. Use assignment statement to determine whether or not a score is within range, and use bool (in C++) to record those information.
If all scores are within legal range, calculate the course’s score and grade of the student, and output both the computed score and the grade earned by the student.
The score for the course is based on the following weights:
Assignments 20%
Tests 40%
Exam 40%
Based on the weighted score, assign the grade for the student as follows: 85<= score <= 100 A
73 <=score<85 B
61 <=score<73 C
49 <= score < 61 D 0 <=score<49 F
Requirement for each and every assignment.
- Comments the program (your name, Purpose, major method).
- use meaningful variable names
- nice/consistent indentation
- good input prompt
- echoed each input (output what is being typed by the user).
- good output layout: answer clearly labeled and separated.
- No credits will be given if the program contains any compile-time or run-time
error.
- Never use C/C++ statements and features not taught in class.
DEDUCTIONS for programs:
- uses a sequence of if ‘s to determine grade (i.e., not using else if’s) -20
- use if-else to assign the value of bool variables -10
- use int/float to store bool results -10
- any use of: break, exit statements (non-structured program) -20
There should only be one place to terminate the program!!!
- Minor mistakes in getting the Wrong answers for grades (A,B,C, etc.) -10
- inadequate comments, indentation, prompts, etc. -20