Starting from:

$35

CSE212-Library Management System Solved

This semester you will be implementing a Library Management System as part of your assignment series.

 

As part of this week’s assignment, you are asked to implement the following requirements set for you.

 

Your Library Management System should have the following classes with specified instance variables:

 

Book:

nameOfBook, ISBN, dueDate (Date), and bookCount 

 

OnlineArticle:

nameOfArticle, DOI, and articleCount 

 

Reader:

readerName,    Id,    reservedBook    (Book),    accessedArticle 

(OnlineArticle) 

 

Date:

day, month, year 

 

Also, you should maintain  the following arrays:

 

Reader[] readerArray  

Book[] bookArray 

OnlineArticle[] articleArray 

 

(As part of this assignment the array sizes should be set to 10)

 

Your application should be able to handle the following scenario and requirements:

 

● You have to create a Menu enum to display the menu items. When a user starts your application, it should prompt the following menu:

 

(1)   Add a new book

(2)  Add a new Online Article

(3)  Create a Reader account

(4)  Reserve a book

(5)  Get access to an online article

(6)  Exit.

●       When a user selects the 1st option, the user should be asked to enter the  nameofBook, ISBN, and dueDate, which then should be used to create the Book object. The created Book object should be then added to the bookArray. bookCount variable should be defined static and should be used to store the total number of books in the library system. The constructor of the Book class needs to be structured so that it can receive multiple parameters. Bear in mind that dueDate should be a Date object where its day, month, and year values are obtained from the user.  

●       When a user selects the 2nd option, the user should be asked to enter a nameOfArticle, and a DOI, which then should be used to create the OnlineArticle object. articleCount variable should be static and should be used to store the total number of online articles in the library system. The constructor of the OnlineArticle class needs to be structured so that it can receive multiple parameters. Then, the newly generated OnlineArticle should be added to the articleArray.  

●       When a user selects the 3rd option, the user should be asked to enter a name, and an ID, which then should be used to create the Reader object. This object should be added to the readerArray. The remaining two object variables of the class (reservedBook and accessedArticle) should retain a “private” access modifier. Therefore, you must use setters and getters to set content and read their content.  

●       When a user selects the 4th option, the application should firstly request the ID of the reader who would like to reserve a book. Accordingly, the system should initially check whether there is a reader account in readerArray with the given ID. If the reader account cannot be found, the system should respond with a “There is no account with that ID” message and exit that option. If the user ID exists, then the user should be asked to enter the ISBN of the book that he/she would like to reserve. If the book with the given ISBN number is not in the bookArray, then the system should display a message stating that “There is no book with that ISBN” and exit that option. If the reader has a valid ID and the book with the given ISBN number is in the bookArray, then the reservedBook variable of the  Reader object then should be set with the book object of the given ISBN.

●       When a user selects the 5th option, the application should request the ID of the reader who would like to access the article. The system then should check whether there is a reader account in readerArray with the given ID. If the reader account cannot be found, the system should display a “There is no account with that ID” message and exit that option. After that confirmation, the user should be asked to enter the DOI of the online article that he/she would like to access. If the article with the given ID number is not in the articleArray, the system should display a message stating “There is no article with that DOI” and exit that option. If both reader account and online article are verified, then the accessedArticle variable of Reader object should be set to the object of the article with the given DOI.

●       When a user selects the 6th option, your application should terminate.

More products