Question: In java, write a Student class that minimally stores the following data fields for a student: -Name String -Student id number String -Number of credits

In java, write a Student class that minimally stores the following data fields for a student:

-Name String

-Student id number String

-Number of credits Int

-Total grade points earned Int

The following methods should also be provided:

-A constructor that initializes the name and id fields

-A method that returns the student name field

-A method that returns the student ID field

-A method that determines if two student objects are equal if their student id are the same (override equals from the class Object)

-Methods to set and retrieve the total number of credits

-Method to set and retrieve the total number of grade points earned

-A method that returns the GPA (grade points divided by credits)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!