Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions

Question

How much of this is in your direct control?

Answered: 1 week ago