Question: Lab 3 : Grade Calculator Program Objective The objective of this lab is to develop a C + + program that allows users to enter

Lab 3: Grade Calculator Program
Objective
The objective of this lab is to develop a C++ program that allows users to enter grades and prints out to
the console the corresponding letter grades.
Learning Outcomes
By the end of this lab, students will be able to:
1. Use do..while loops to repeatedly execute a block of code.
2. Implement if-else statements to make decisions based on user input.
3. Validate user input to ensure it falls within a specified range.
4. Develop a complete C++ program from scratch.
Program Requirements
The program should prompt the user to enter a grade between 0 and 100.
Grades can be integers or decimal numbers.
The program must check if the entered grade is within the acceptable range (0-100). If not, it
should inform the user and prompt for a valid grade.
Based on the entered grade, the program should determine and print the corresponding letter
grade following this scheme:
o A: 90-100
o B: 80-89
o C: 70-79
o D: 60-69
o F: 0-59
The program should allow the user to enter multiple grades using a do..while loop. After each
grade entry, the program should ask the user if they want to enter another grade.
The program should provide clear feedback to the user, including the letter grade and any error
messages for invalid input.
Example Output
Enter a grade (0-100): 85
Letter grade: B
Do you want to enter another grade? (y/n): y
Enter a grade (0-100): 105
Invalid grade. Please enter a grade between 0 and 100.
Do you want to enter another grade? (y/n): y
Enter a grade (0-100): 55.75
Letter grade: F
Do you want to enter another grade? (y/n): n
Thank you for using the grade calculator!
Submission
Submit the source code file (.cpp) to the courses blackboard webpage.
Evaluation Criteria
Correct use of do..while loops and if-else statements.
Proper input validation to ensure grades are within the range of 0-100.
Accurate determination and display of letter grades.
Code readability and proper commenting.
Tips
Test your program with various inputs to ensure it handles all edge cases.
Use meaningful variable names and add comments to explain your code.
Lab 3: Grade Calculator Program
Objective
The objective of this lab is to develop a C++ program that allows users to enter grades and prints out to
the console the corresponding letter grades.
Learning Outcomes
By the end of this lab, students will be able to:
Use do..while loops to repeatedly execute a block of code.
Implement if-else statements to make decisions based on user input.
Validate user input to ensure it falls within a specified range.
Develop a complete C++ program from scratch.
Program Requirements
The program should prompt the user to enter a grade between 0 and 100.
Grades can be integers or decimal numbers.
The program must check if the entered grade is within the acceptable range (0-100). If not, it
should inform the user and prompt for a valid grade.
Based on the entered grade, the program should determine and print the corresponding letter
grade following this scheme:
A: 90-100
B: 80-89
C: 70-79
D: 60-69
F: 0-59
The program should allow the user to enter multiple grades using a do.. while loop. After each
grade entry, the program should ask the user if they want to enter another grade.
The program should provide clear feedback to the user, including the letter grade and any error
messages for invalid input.
Example Output
Enter a grade (0-100): 85
Letter grade: B
Do you want to enter another grade? (yn):y
Enter a grade (0-100): 105
Invalid grade. Please enter a grade between 0 and 100.
Do you want to enter another grade? (yn):y
Enter a grade (0-100): 55.75
Letter grade: F
Do you want to enter another grade? (yn):n
Thank you for using the grade calculator!
Lab 3 : Grade Calculator Program Objective The

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!