Question
Need some help with the following java method. findItem public unisa.library.Item findItem(java.lang.String id) throws unisa.library.ItemNotFoundException Find the item by the given ID and return that
Need some help with the following java method.
findItem
public unisa.library.Item findItem(java.lang.String id) throws unisa.library.ItemNotFoundException
Find the item by the given ID and return that Item
Parameters:
id - The item to be returned
Returns:
The item searched for.
Throws:
unisa.library.ItemNotFoundException - thrown if the id is not found.
Draws from a class that extends this Library Class.
So far i have the following:
public unisa.library.Item findItem(java.lang.String id) throws unisa.library.ItemNotFoundException {
if(itemList.contains(id)) {
tempList.add(itemList);
}
if(!tempList.isEmpty()){
return Item;
else {
throw ItemNotFoundException;
thank you for any help.
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