CSE148 HW3 1. Write a class called Name. This class should have two instance fields: firstName (String) and lastName (String). Complete it with constructors of your choice, getters and setters, and the toString method. 2. Write a class called Textbook. This class should have four instance fields: title, isbn, authorName, and price. Complete it with constructors of your choice, getters and setters, and the toString method. 3. Write a class called Instructor. This class sho

CSE148 HW3

1. Write a class called Name. This class should have two instance fields: firstName (String) and lastName (String). Complete it with constructors of your choice, getters and setters, and the toString method.

2. Write a class called Textbook. This class should have four instance fields: title, isbn, authorName, and price. Complete it with constructors of your choice, getters and setters, and the toString method.

3. Write a class called Instructor. This class should have the following fields: name (Name), id (String, unique) rank(String), salary (double), officeNumber (String). Complete it with constructors of your choice, getters and setters, and the toString method.

4. Write a class called Course. The class should have the following fields: number (String), title (String), description (String), numberOfCredit (int), textbook (Textbook), and instructor (Instructor). Complete it with constructors of your choice, getters and setters, and the toString method.

One example of a Course is: Number: CSE148; Title: Object Oriented Programming; description:

“This course covers object oriented programming principles using Java”; NumberOfCredists: 4;

5. Write a class called Student. The class should have the following instance fields: name (Name), id (String, unique), an array of up to four Course objects, gpa (double), and major (String). Complete it with constructors of your choice, getters and setters, and the toString method.

6. Write a StudentBag class that contains an array of Student objects. Complete this class to include at least one insert method, a display method, a findById method, and a removeById method.

7. Write a Demo class. In its main method, create a bunch of objects of each class to build a bunch of Student objects. Insert these Student objects into the array in the StudentBag object. And finally test all the methods in the StudentBag class.