This is what the project asks. There is supposed to be a table on it that isn't showing up in the most, but you get the gist.
Assignment Description: Create a modular program that will provide the following menu to the
user. Then, write different functions to implement the functionality of this program to compute
the expected values.
1. Enter the Grades
2. Show the Grades in a Tabular Format
3. Show the Overall Grade (number and letter)
4. Exit if any other input
Enter your choice:_
The grades are calculated based on the following breakdown:
Assignments 1-4 Each 5% Total 20%
Lab Tests 1-3 Each 10% Total 30%
Lecture Tests 1-4 Each 10% Total 40%
Post Labs 1-9 Each .3% Total 2.7%
Quizzes 1-9 Each .4% Total 3.6%
Clickers Total 3.7%
Your program should ask the user for the scores based on the above date. Then, the final score
will be calculated and printed in Here is an example run:
Enter the score for the first assignment: 89.5
Enter the score for the second assignment: 85
Enter the score for the third assignment: 86.90
..........
The Overall Grade is 86.5.
Letter Grade: B
For option number 2 of the menu, make sure you use a consistent format using manipulators.
Make sure your program includes the below functions:
1. int Menu ( ) // should be called to display the menu option and this function will return
the choice
2. void DisplayGrades (float assignWghtAvg, float labWghtAvg, lectureWghtAvg,
postWghtAvg, quizWghtAvg, float clickWghtAvg) // this function should be called to
display the Grades in a Tabular Format. This table should contain the category name and
the weighted average for that category. Ex: Clickers 3.4 %
3. float AssignmentGrade (float asgnmnt1, float asgnmnt2, float asgnmnt3, float
asgnmnt4) // This function is used to calculate total weight of assignment towards final
grade
4. float LabTestGrade (float test1,float test2,float test3) // this function will calculate total
weight of lab test grades towards final grade
5. float LectureTest Grade(float test1,float test2,float test3,float test4) // This function
will calculate total weight of lecture test grades towards final grade
6. float PostLabGrade ( ) // This function will accept 9 inputs from user as his postlab grade
and calculate total weight of Post lab grades towards final grade
7. float QuizGrade ( ) // this function should ask the user to enter his grades for 9 quiz and
based on that calculate the total weight of quiz towards final grade
8. float ClickerGrade ( ) // this function should ask the user to enter his clicker score and
calculate weight based on it towards the final grade.
9. bool gradeIsValid (float grade) // This function should make sure that user entered
grades are valid
10. bool menuChoiceIsValid (int choice) //This function should make sure that the entered
menu choice is valid
Apart from these functions you can create more functions if you think it is suitable for your
program and makes your code more modular and neat.
This is what I've got so far, it doesn't seem right
#include <iostream>
using namespace std;
//Function prototype
char showmenu();
int main()
{
//Declare Variables
int choice; //To hold menu choices
float AssignmentGrade (float asgnmnt1, float asgnmnt2, float asgnmnt3, float asgnmnt4); // This function is used to calculate total weight of assignment towards final grade
float asgnmnt1, asgnmnt2, asgnmnt3, asgnmnt4; //This function should ask the user to enter his 4 assignment grades
float labTestGrade(float test1,float test2,float test3); //this function will calculate total weight of lab test grades towards final grade
float test1,test2,test3, test4; //This function will ask the user to enter his grades for 3 tests.
float lectureTestGrade(float test1,float test2,float test3,float test4); //This function will calculate total weight of lecture test grades towards final grade
float lab1, lab2, lab3, lab4, lab5, lab6, lab7, lab8, lab9;
float postLabGrade(); // This function will accept 9 inputs from user as his post lab grade and calculate total weight of Post lab grades towards final grade
float quiz1, quiz2, quiz3, quiz4, quiz5, quiz6, quiz7, quiz8, quiz9;
float quizGrade() ; // This function should ask the user to enter his grades for 9 quiz and based on that calculate the total weight of quiz towards final grade
float clicker;
float clickerGrade() ; // This function should ask the user to enter his clicker score and calculate weight based on it towards the final grade.
bool gradeIsValid(float grade); // This function should make sure that user entered grades are valid
bool menuChoiceIsValid(int choice); //This function should make sure that the entered menu choice is valid
//
if (choice != '4')
{
cout << "Enter the grades of your 4 assignments" << endl;
cin >> asgnmnt1, asgnmnt2, asgnmnt3, asgnmnt4;
cout << "Enter the grades of you 3 lab tests" << endl;
cin >> test1, test2, test3;
cout << "Enter the grades of your 4 lecture tests" << endl;
cin >> test1 >> test2 >> test3 >> test4;
cout << "Enter the grades of your 9 post labs" << endl;
cin >> lab1 >> lab2 >> lab3 >> lab4 >> lab5 >> lab6 >> lab7 >> lab8 >> lab9;
cout << "Enter the grades of your 9 quiz grades" << endl;
cin >> quiz1 >> quiz2 >> quiz3 >> quiz4 >> quiz5 >> quiz6 >> quiz7 >> quiz8 >> quiz9;
cout << "Enter your clicker grade" << endl;
cin >> clicker;
}
else
cout << "Goodbye" << endl;
return 0;
}
// Function definition to display the menu choice and return the choice to the user
char showMenu()
{
int userChoice;
//Displays the menu choices
cout << "\nGrade Calculator Menu" << endl;
cout << "1. Enter the Grades" << endl;
cout << "2. Show Grades in Tabular Format" << endl;
cout << "3. Show the Overall Grade" << endl;
cout << "4. Exit this menu" << endl;
cin >> userChoice;
return userChoice;
}