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

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!