Question: This assignment assesses your ability to apply generic classes and methods to create a versatile library catalog that can handle different types of items. It
This assignment assesses your ability to apply generic classes and methods to create a versatile library catalog that can handle different types of items. It evaluates your understanding of generic concepts in the context of a realworld application.
Assignment Instructions
Scenario: Consider you have been asked to develop a generic library catalog in Java that can store and manage different types of library items.
You are tasked with utilizing generic classes and methods to ensure flexibility and code reusability.
Requirements:
Generic Catalog Class:
a Implement a generic catalog class that can store information about library items eg books, DVDs magazines
b Ensure that the catalog works seamlessly with different types of items by using generics.
Library Item Class:
a Create a genericLibraryItemclass with attributes such astitleauthor anditemID
b Ensure that theLibraryItemclass is compatible with the generic catalog.
Library Operations:
a Develop methods within the generic catalog to add a new library item, remove an item, and retrieve item details.
b Implement error handling to manage scenarios such as attempting to remove a nonexistent item.
User Interface:
a Create a simple commandline interface for users to interact with the library catalog.
b Allow users to add a new library item, remove an item, and view the current catalog.
Testing:
a Implement comprehensive testing for your generic catalog andLibraryItemclass
b Test scenarios should include adding and removing items, ensuring the catalog works with various types of library items.
Guidelines
Utilize generic classes and methods to create a flexible and reusable library catalog.
Focus on code modularity and reusability by using generics effectively.
Implement exception handling to manage unexpected scenarios gracefully.
Provide clear and concise comments and documentation for your code.
Deliverables
Java Program Source Code:
Submit a well documented source code.
Implement generic classes and methods for creating generic library catalog.
Output Screenshot:
Provide a screenshot of the program's output.
Grading Criteria
Your assignment will be evaluated based on the following criteria:
Implementation of Generic Class: Implement a generic catalog class that can store information about library items. Ensure seamless compatibility with different types of items using generics.
Implementation of Generic Methods: Create a generic LibraryItem class with attributes such as title, author, and itemID. Ensure compatibility with the generic catalog.
Library operations: Develop methods in the generic catalog to add a new library item, remove an item, and retrieve item details.
Error Handling: Implement error handling to manage scenarios such as attempting to remove a nonexistent item. Errors should be handled gracefully with clear messages.
Logic and Computation.
Program Flow and Structure.
Output.
Code style and readability.
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
