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
Get step-by-step solutions from verified subject matter experts
