Create a student class in java. The student should have 3 private data members:
-
private String name
-
private int id
-
private double gpa
It should have one constructor, that takes in all three pieces of data, and assigns them using the this operator;
Each data member should have a corresponding getter that allows another program to get information about the student, and a setter that allows someone to set information for the student.
It should also have a method called dispayStudent() which will output information about the student in this way: The student Bob Moore has an id of 87678 with a gpa of 3.5.
In the main() method, create a student object with the name "Lisa Waddell", id of 54321, and gpa of 2.5, then call the displayStudent() method to generate the ouput
The student Lisa Waddell has an id of 54321 with a gpa of 2.5.
Make sure to rename your codespace so you can find this in the future!