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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started