Question: Use java You are to build a class called student. The student class is to have the following attributes with the appropriate data types: Name
Use java
You are to build a class called student. The student class is to have the following attributes with the appropriate data types:
Name
ID
Major
GPA
The student class is to have the following methods:
setName this method will allow the user to place a name in the student name attribute
setID this method will allow the user to place an ID in the student ID attribute
setMajor this method will allow the user to place a major in the student major attribute
setGPA this method will allow the user to place a GPA in the student GPA attribute
getName this method will allow the user to get the name from the student name attribute
getID this method will allow the user to get the ID from the student ID attribute
getMajor this method will allow the user to get the major from the student major attribute
getGPA this method will allow the user to get the GPA from the student GPA attribute
Once you have the student class built you are to create a program in which you create two instances of the student class. Your program is to use the set methods to put the information into each of the instances. You may prompt the user for the data or literally put the information in. After the two student instances have been created you are to use the get methods to have your program output the information to confirm that your instances are working
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
