Question: Need help with making program: The java program must contain a main ( ) method. Standard programming practice locates the main ( ) method at
Need help with making program: The java program must contain a main method. Standard programming practice locates the
main method at the end of the program. The program class must be the same name as the java
file name.
The first class is the Student class. It has three instance variables which include the student
name, credit hours earned and quality points. At a minimum, it should have following methods:
A constructor that allows the students name, credit hours and quality points to be
initialized.
A method named gpa that returns the students grade point average, which is
computed as the quotient of the quality points and credit hours.
A method eligibleForHonorSociety that returns whether a students gpa exceeds the
threshold for honor society membership, which applies to all students.
A toString method that returns a string containing the student name and grade point
average
A class static method setGpaThreshold that sets the minimum gpa threshold for
honor society membership.
The Student class has two subclasses.
The first is Undergraduate. It has an additional instance variable that specifies the students
year: either a freshman, sophomore, junior or senior. At a minimum, it should have following
methods:
A constructor that allows the students name, credit hours, quality points and year to
be initialized.
An overridden method eligibleForHonorSociety that applies the requirement that the
student be either a junior or senior in addition to the requirement that applies to all
students to be eligible for honor society membership.
An overridden toString method that returns a string containing the students name,
grade point average, and year.
The second subclass is Graduate. It has an additional instance variable that reflects whether
the student is pursuing a masters degree or doctorate at a minimum, it should have following
methods:
A constructor that allows the students name, credit hours, quality points and degree
sought to be initialized.
An overridden method eligibleForHonorSociety that applies the requirement that the
student be seeking a masters degree in addition to the requirement that applies to all
students to be eligible for honor society membership.
An overridden toString method that returns a string containing the students name,
grade point average, and degree sought.
Finally, there should be a fourth class DataControl.. It should read in student information from a
text file named students.txt If the file does not exist, an error message is displayed, and the
program should terminate. Each line of the text file will represent the information for one
student
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
