write a program that creates a student class consisting of student ID and three
ID: 3646371 • Letter: W
Question
write a program that creates a student class consisting of student ID and three exam scores.in a seperate implementation class allow the user to enter class values. call the
constructor to create an instance of the student class. DO NOT allow the id to be changed
after an object has been constructed. provide a method in the student class to compute and
return the overall exam average. print all socres and the average value formatted with no
digits to the right of the decimal from the implementation class. use a single class method
to enter all data.
Explanation / Answer
#include int main (void) { /* Variable declarations: */ double grade; /* Function body: */ printf ( "A program that prints letter grades "); printf ( "Enter grade "); scanf ( "%1f", &grade); if (grade >= 90) printf ( "Grade = 'A' "); else if (grade >= 80) printf ( "Grade = 'B'"); else if (grade >= 70) printf ( "Grade = 'C'"); else if (grade >= 60) printf ( "Grade = 'D'"); else printf ( "Grade = 'F'"); /* end if*/ return grade; } /* end function main*/Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.