Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement the following algorithm in C++ using \"class\" keyword to create a cla

ID: 3757148 • Letter: I

Question

Implement the following algorithm in C++ using "class" keyword to create a class named Student having the followings:

studFirstName

studLastName

studExam1

studExam2

studExam3

studAvg

studGrade


start
declare variables
print “Enter student first name”
input studFirstName
print “Enter student last name”
input studLastName
print “Enter score for exam 1”
input studExam1
print “Enter score for exam 2”
input studExam2
print “Enter score for exam 3”
input studExam3
compute studScore = studExam1 + studExam2 + studExam3
compute studAvg = studScore / 3
print “Student’s Final Grade”
if studAvg >= 90 then
Grade = 'A'
else if studAvg >=80 then
Grade = 'B'
else if studAvg >=70 then
Grade = 'C'
else if studAvg >=60 then
Grade = 'D'
else
Grade = 'F'
endif
Print Grade
stop

Please answer in c++

Explanation / Answer

#include #include using namespace std; class Student { private: string studFirstName, studLastName; int studExam1, studExam2, studExam3; double studAvg; char studGrade; public: Student() { cout > studFirstName; cout > studLastName; cout > studExam1; cout > studExam2; cout > studExam3; studAvg = (studExam1 + studExam2 + studExam3) / 3.0; } double getStudAvg() const { return studAvg; } char getGrade() { if(studAvg >= 90) { studGrade = 'A'; } else if(studAvg >= 80) { studGrade = 'B'; } else if(studAvg >= 80) { studGrade = 'C'; } else if(studAvg >= 80) { studGrade = 'D'; } else { studGrade = 'F'; } return studGrade; } }; int main() { Student student; cout