Question: IN JAVA Create a student class Create static fields classNumber, className, instructor Create instance fields studentId, firstname, lastname, address, city, state, email, etc. Make all

IN JAVA

Create a student class

Create static fields classNumber, className, instructor

Create instance fields studentId, firstname, lastname, address, city, state, email, etc.

Make all fields private

Create getter and setter methods for the static fields

Create getter and setter methods for the instance fields

Create a constructor for the class that takes student firstname and lastname Constructor should generate a sequential student id (ids should start with 1000 and increment for each new student)

Create a second constructor that takes all fields (firstname, lastname, address, city, etc.) Constructor should call the first constructor to initialize firstname and lastname, and create the next student id.

Create a toString( ) string method for the class toString( ) method should output all fields, including studentId, name, instructor, className, etc.

Create a second class that will test the student class

Instantiate at least 5 objects of the student class using both the small and large constructors

Print out the 5 objects using the toString( ) method

Call getters and setters to alter some student information (e.g. firstname, address, etc.)

reprint the 5 objects

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!