Write a class Student having attributes to store the following data: Name, fathers’ Name, department, degree, enrolment, seat number, marks of three subjects. Also write a class to test all methods of Student class. Add the following methods in the above class. • int getTotal() : This methods returns the total of marks • void printTotal() Prints the total marks of Student • float getPercentage() this method calculates the percentage of a student • void printPercentatge() this method prints the percentage of student • char getGrade() this method calculates and returns the grade. • void printGrade() this method prints the grade of a student. • void printInfo() This method prints all information of the student.
3. Write a class Student having attributes to store the following data: Name, fathers’ Name, department, degree, enrolment, seat number, marks of three subjects. Also write a class to test all methods of Student class.
Add the following methods in the above class.
• int getTotal() : This methods returns the total of marks
• void printTotal() Prints the total marks of Student
• float getPercentage() this method calculates the percentage of a student
• void printPercentatge() this method prints the percentage of student
• char getGrade() this method calculates and returns the grade.
• void printGrade() this method prints the grade of a student.
• void printInfo() This method prints all information of the
student.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images