Your program should include three classes: Course, TermTranscript, and HW2_yourId classes. Course class: should contain necessary instance variables and methods of a course and at least these methods: getGradePoint(): gives a grade point of a course using table 1. getCreditEarned(): gives number of earned credits if student have one of the grades from table 1; otherwise it is zero. getCreditAttempted(): gives number of attempted credits in a course. TermTranscript class: should contain student information, previous semesters information and all courses information. The class should contain any necessary methods, and at least the following: getSemesterGPA() method: calculate a semester GPA. getCGPA() method: calculate cumulative GPA (CGPA). semesterCreditEarned() method: gives credit earned in a semester. semesterCreditAttempted() method: gives credit attempted in a semester. generateReport() method: creates an output file with name “ID_semesterRep.txt” and displays the report as shown in the sample outputs.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Your program should include three classes: Course, TermTranscript, and HW2_yourId classes.
Course class: should contain necessary instance variables and methods of a course and at least these methods:
-
getGradePoint(): gives a grade point of a course using table 1.
-
getCreditEarned(): gives number of earned credits if student have one of the grades from table 1;
otherwise it is zero.
-
getCreditAttempted(): gives number of attempted credits in a course.
TermTranscript class: should contain student information, previous semesters information and all courses information. The class should contain any necessary methods, and at least the following:
-
getSemesterGPA() method: calculate a semester GPA.
-
getCGPA() method: calculate cumulative GPA (CGPA).
-
semesterCreditEarned() method: gives credit earned in a semester.
-
semesterCreditAttempted() method: gives credit attempted in a semester.
-
generateReport() method: creates an output file with name “ID_semesterRep.txt” and displays the report
as shown in the sample outputs.
Step by step
Solved in 2 steps