Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions