Question: Write a class that represents a student. Every student has a name, an id number, a number of credits, and a number of grade points.

Write a class that represents a student. Every student has a name, an id number, a number of credits, and a number of grade points.

Also, include in your class a default constructor, a second constructor with all parameters, an accessor method (getter) for the student name, and a method called gpa that will calculate and return the students grade point average. (Hint: gpa = points/credits)

II. Using the class that you just wrote, answer the following questions.

Write code that will declare and initialize an object using the default constructor.

Write code that will declare and initialize an object using the overloaded constructor.

Write code that will retrieve and print the students gpa from #2.

java basic programming simple as possible use import java.util.*; thanks in advance

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!