Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

need help Java program where class Rentals implements interface of Inventory. He

ID: 672048 • Letter: N

Question

need help Java program where class Rentals implements interface of Inventory. Here is what Inventory should do.

public interface Inventory
{
/**
* Add an item to the inventory. The parameter item
* should not be something already in the inventory. As a
* result of adding an item, the item will be assigned an ID starting
* with 1 and increasing by 1 for each item added. IDs
* are not reused. All items are kept
* in a database internal to the inventory so that they may be searched
* for using a query.
* @param item the item to add.
* @return true when the item is added, false if the item cannot
* be added for any reason.
*/

Explanation / Answer

public interface Inventory
{
/**
* Add an item to the inventory. The parameter item
* should not be something already in the inventory. As a
* result of adding an item, the item will be assigned an ID starting
* with 1 and increasing by 1 for each item added. IDs
* are not reused. All items are kept
* in a database internal to the inventory so that they may be searched
* for using a query.
* @param item the item to add.
* @return true when the item is added, false if the item cannot
* be added for any reason.
*/

}