Question
In this excercise, you will design and implement a library management system. The library management system will be for an engineering school that has the
In this excercise, you will design and implement a library management system. The library management system will be for an engineering school that has the following departments: Computer Engineering (CPEN), Electrical Engineering (ELEN), Industrial Engineering (IMEN), Mechanical Engineering (MEEN) and Civil Engineering (CIEN). The system will have the following requirements:
Each book has a title, author, ISBN number, number of pages, edition, publisher and engineering type (CPEN, ELEN, IMEN, MEEN or CIEN)
There are faculty accounts that have first name, last name, department, ID and position (adjunct professor, assistant professor, professor) and amount of borrowed books
There are student accounts that have first name, last name, ID, department and level (1, 2, 3 or 4) and amount of borrowed books
The library management system keeps track of books, and users by using files.
One file handles book information
One file handles user information
One file registers a name and a borrowed book.
There is a Registry class that holds a borrowers ID and the ISBN number of the borrowed book.
Students of levels 1 and 2 can only borrow up to 3 books, students of levels 3 and 4 can borrow up to 5 books. Faculty can borrow up to 6 books.
When returning a book, you should input the amount of days the user held the book. The first 15 days are free, while extra days have a cost of $5.
The interface that you should use for this program is:
package projectinterface;
public interface LibraryInterface { public void addBook(Book book); public void addStudent(Student student); public void addFaculty(Faculty faculty); public void printBookInfo(String ISBN); public void deleteBook(String ISBN); public void deleteStudent(String ID); public void deleteFaculty(String ID); public boolean checkBookIsBorrowed(String ISBN); public boolean checkStudentHasBooks(String ID); public boolean checkFacultyHasBooks(String ID); public void printAllBooks(); public void printAllBooksForPerson(String ID); public void printAllBooksByDepartment(String department); public void borrowBookToStudent(String ID, String ISBN); public void borrowBookToFaculty(String ID, String ISBN); public void returnBookFromStudent(String ID, String ISBN); public void returnBookFromFaculty(String ID, String ISBN); public void printBorrowedBookRegistry(); }
The program should have a menu that allows the following:
Add a new book
Add a new student
Add a Faculty
Search for information about a specific book (use ISBN)
Delete a book (use ISBN)
Check first if a user hasnt borrowed the book
Delete a user from the system
Verify the user has returned all his books first
Show all books
Show all books for a specific user (use ID)
Show all books for a specific department
Borrow a book to a user
Return a book
Show every user and the books borrowed by user
Design constraints:
Inheritance: Student and Faculty classes extend the Person class.
Composition: Library class has:
ArrayList
ArrayList
ArrayList
ArrayList
Interface: Library implements the provided LibraryInterface class.
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