Grading System program
Dec 11, 2016 at 2:31am UTC
i needed to create a program that will view student information, choose grades, input grades, calculate grades, check for weighted average, add remarks and generate assessment. the grade components will be 20% assignment, 30% seatwork and 50% quiz. but i'm confused on where should i put the code that will calculate for the grade given the formula. this is my code so far:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
#include<iostream>
using namespace std;
void studentInfo();
void chooseCourse();
void inputGrades();
void calculateGrades();
void checkWeightedEquivalence();
void checkRemarks();
void summary();
struct Student
{
string name, mailAdd, program;
int studNum, contactNum, yearLevel;
string course;
int prelim, midTerm, finals;
};
Student student;
int main()
{
studentInfo();
chooseCourse();
return 0;
}
void studentInfo()
{
cout << "\n Please fill up the following information." << endl;
cout << "\n Name: " ;
cin >> student.name;
cout << " Student No.: " ;
cin >> student.studNum;
cout << " Contact No.: " ;
cin >> student.contactNum;
cout << " Mail Address: " ;
cin >> student.mailAdd;
cout << " Year Level: " ;
cin >> student.yearLevel;
cout << " Program: " ;
cin >> student.program;
}
void chooseCourse()
{
system("CLS" );
string courses[3] = {"Physics" , "DATABASE1" , "Math" };
cout << "\n Please choose your course." << endl << endl;
for (int i=0; i<sizeof (courses)/sizeof (courses[0]); i++)
{
cout << " [" << i+1 << "] " << courses[i] << endl;
}
int choice;
cout << "\n Enter number choice: " ;
cin >> choice;
student.course = courses[choice+1];
}
void inputGrades()
{
}
void calculateGrades()
{
}
void checkWeightedEquivalence()
{
}
void checkRemarks()
{
}
Last edited on Dec 11, 2016 at 2:39am UTC
Dec 11, 2016 at 4:31am UTC
It should be in your calculateGrades()
function
Topic archived. No new replies allowed.