Question
JAVA ECLIPSE PROGRAM First create the following five classes: 1. Person: first name, last name, id, and phone number. It should be an abstract class.
JAVA ECLIPSE PROGRAM
First create the following five classes: 1. Person: first name, last name, id, and phone number. It should be an abstract class.
2. Student: first name, last name, id, phone, gpa, major and a courseBag. The courseBag should contain courses taken, courses currently taking, and courses to be taken to graduate in a given major for each student. The information should be stored in one array or three arrays as String objects in the form of course numbers. Course grade should also be included for each course the student took. If you would like to use one array, you should also have a data field called courseType to indicate whether the students took, is taking or will need to take the said course for a given major.
3. Faculty: first name, last name, id, phone, title and salary Notice that the id numbers must be unique for the above three classes. They must be automatically generated sequentially starting from 1. They can NOT be changed or reused.
4. Textbook: book title, name of the author(s), publisher, book price, and the ISBN number (unique).
5. Course: course title, course number (unique), textbook assigned, and number of credits.
Note: each class should have some kind of custom exception handling capability to check data validity. They should be implemented in both constructors and setters. Also, make sure you use deep or shallow copy of objects appropriately.
Now create the following four bag classes: 1. PeopleBag: contains one array for both Student and Faculty objects.
2. TextBookBag: contains an array of the textbooks
3. MasterCourseBag: Contains a master list of all the courses offered in the college (but you just need to create at most twenty courses here).
4. CourseBag: As mentioned earlier, it should contain either one or three arrays. For each bag above, you need the following methods:
1. add() method to add objects into the bag.
2. display() method to display the whole content of the bag.
3. find() method to search the bag for individual object. For the PeopleBag, you search by id, for the TextbookBag, by ISBN number, and for the MasterCourseBag, by the course number
4. delete() method to delete a given object. For the PeopleBag, you delete by id, for the TextbookBag, by ISBN number, and for the MasterCourseBag,by the course number.
5. load() method to load data from a binary file previously saved for that bag to use.
6. save() method to save the bag / array(s) onto the hard drive as a binary file.
7. exportData() method to save the bag content into a text file.
8. importData() method to read data from a text file and then create objects using the data to put into the array. You may design your own data file.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started