Question: Exercise 0 1 : a - Create a class Student that has the following private data: ID ( int ) , name ( String )
Exercise:
a Create a class Student that has the following private data: ID int name String gpa double
b Add a constructor that has no arguments, it initialize the data to zero for id and gpa, and null for the name.
c Add a constructor that receives three arguments that initialize the data of the class.
d Add setter getter methods.
e Create another class called "Test" that has main method, and create two objects of class Student using each one of the constructors.
f Print each one of the objects you created.
What is the output?
g If you want to print the data of each object, when object is printed? What should you do
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
