Question: Assignment Content Design a class structure for a Library Management System that uses data structures like Stack and Queue to manage books within a library.
Assignment Content
Design a class structure for a Library Management System that uses data structures like Stack and Queue to manage books within a library. Your system should include the following features:
Book Class: Create a base class Book with common attributes for the book's title, author, genre, ISBN, availability status, and condition. Create necessary constructors including the copy constructor. The Book class should provide methods to check out the book, return the book, check its availability, and update its condition good or damaged in addition to the required accessors and mutators.
Specific Book Classes: Derive three specific book classes Fiction NonFiction, Reference from the Book class. Override the base class methods to provide specific behaviors. Moreover, each specific book must have condition ranges according to usage to analyze their condition against standard levels whether their conditions are within the acceptable range according to their usage.
Shelf Stack: Implement a stack data structure to represent a collection of book shelves. Each shelf can stack on top of another and should be sortable by a certain attribute, the number of books. Example: public class ShelfStack private Stack stack; Other attributes and methods and public class Shelf private String identifier; private ArrayList listBooks; Other attributes and methods you need.
Book Queue: Implement a queue data structure to manage the borrowing order of books. The queue should support enqueue and dequeue operations, and include a method to reverse the order of books waiting to be borrowed.
Library Management: Create a LibraryManagement class that uses both the Shelf Stack and Book Queue. Include methods to transfer books from their shelves to the borrowing queue, ensuring that the shelves are sorted, the borrowing queue is reversed before borrowing time, and have functionality to analyze their conditions and update availability statuses.
Testing: Write test cases to demonstrate the functionality of the Shelf Stack and Book Queue, including the sorting and reversing features, as well as the overall management of the library. You may use either JUnit or MainTester main method
Your task is to provide the class definitions, including any necessary member variables and methods, to implement the above features. You must add Javadoc for your classes and methods. Ensure that your code adheres to OOP principles such as encapsulation, inheritance, and polymorphism. For all your methods, you need to provide runtime analysis in terms of BigO On Ologn etc.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
