Question: please implement all methods and prompts in all classes including main. case 1 - 6 as well as number 3 & 4 borrowed items and

please implement all methods and prompts in all classes including main. case 1-6 as well as number 3 & 4 borrowed items and returned items, syntax to display in main
create the following classes and a main program for a simple library management
system:
LibraryItem Class:
Attributes: title (String), creator (String), itemId (int), available (boolean)
Methods: checkoutItem(), returnItem(),isAvailable(),getItemId(), toString()[optional]
Book Class (extends LibraryItem):
Attributes: genre (String), numberOfPages (int)
Constructor: Book(String title, String creator, int itemId, String genre, int numberOfPages)
Method: toString()[optional]
DVD Class (extends LibraryItem):
Attributes: director (String), duration (int)
Constructor: DVD(String title, String creator, int itemId, String director, int duration)
Method: toString()[optional]
LibraryMember Class:
Attributes: name (String), address (String), contact (String), memberId (int), borrowedItems (array of LibraryItem), fines (double)
Constructor: LibraryMember(String name, String address, String contact, int memberId)
Methods: borrowItem(LibraryItem item), returnItem(LibraryItem item), toString()[optional]
Library Class:
Attributes: items (array of LibraryItem), members (array of LibraryMember)
Constructor: Library()
Methods: addItem(LibraryItem item), addMember(LibraryMember member), toString()
Main Class:
Create a Library object.
Use a menu-driven console interface to:
Add items (books or DVDs) to the library.
Add members to the library.
Allow members to borrow items.
Allow members to return items.
Display the library's state.
Exit the program.
Ensure the user can interact with the library management system through the console interface, using simple arrays for managing items and members. 1. Add item
2. Add member
3. Borrow item
4. Return item
5. Display library
6. Exit
Enter your choice: 3
Enter member ID: 1001
Enter item ID to borrow: 1
Item checked out successfully.
1. Add item
2. Add member
3. Borrow item
4. Return item
5. Display library
6. Exit
Enter your choice: 3
Enter member ID: 1001
Enter item ID to borrow: 1
Item is not available for borrowing.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!