Create an OOP Java program that will ASK the user for the Prelim, Midterm, Prefinal, and Finals grades.
Create two (2) classes: MyMainClass and SecondClass.
The class SecondClass has 5 double attributes: prelim, midterm, prefinal, finals.
Create one (1) constructor method to set the prelim, midterm, prefinal, and finals grades.
Create one (1) accessor method to calculate for and return the final grade output.
Display the final grade output in the MyMainClass.
Sample output:
Enter prelim grade:75
Enter the midterm grade: 80
Enter the prefinal grade: 90
Enter the final grade: 91
Your final grade is 85.4
Comments
Leave a comment