Question: 1) In Student.java , create a Student class that will have the following fields/properties and methods: String firstName (5 pts) String lastName (5 pts) String

1) In Student.java, create a Student class that will have the following fields/properties and methods:

  • String firstName (5 pts)
  • String lastName (5 pts)
  • String major (5 pts)
  • double gpa (5 pts)
  • int numberOfClasses (5 pts) //number of classes the student is currently enrolled in
  • boolean attending (5 pts) //indicates if the student is currently classified as "attending classes"
  • getter and setter methods for each of the above (12 total -- 6 getters and 6 setters, 5 points each, for 60 points total)

2) In lastname_lab1.java, create one student objects based on your Student class that you created in (1). You may choose what values to use to initialize all 6 fields, but you must use the methods you defined in (1) to set the fields in order to receive full credit for this part of the lab. For full credit, you must also invoke the methods you created in (1) to print out the field values within your lastname_lab1.java file. (10 points)

Note: lastname_lab1.java should have a main() function; Student.java should not, it should just contain the code defining the Student class in accordance with the above requirements.

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!