samedi 18 septembre 2021

Define a class for storing a student's data for a course in c++

Define a class for storing a student's data for a course.

In the class, it must be possible to store the student number, student name and surname, and three grades for each of the two mid-term exams and one final exam.

First, declare an object using the class you defined. Then, accept input from the user for student name and surname, student number, and three grades and store these values in the appropriate members of the declared variable. Finally, your program must decide if the student fails or passes the class, by reading the grades from the variable's appropriate members and calculating the final grade. Output a message with the student's name, number, the final grade, and whether the student passes the class or not. Assume that the grades are over 100 points and use 30% weight for mid-term exams and 40% weight for the final exam. A student passes if the grade is greater than or equal to 50.

Aucun commentaire:

Enregistrer un commentaire