Question
Implement an Inventory Management System (IMS) to store information about all house items that have six categories: Electronic Devices, Furniture, Clothes, Books, Kitchen Appliances and
Implement an Inventory Management System (IMS) to store information about all house items that have six categories: Electronic Devices, Furniture, Clothes, Books, Kitchen Appliances and Toys.
A HouseItem can be identified by many fields including category, Identifier, …
1- Describe the HouseItem data type using Java classes. Make sure to use Java inheritance, interface, and abstract classes.
2- You are requested to implement a simple application that manages the house items. Your Java application should use an array to store all information regarding all items in the house using the newly created data type HouseItem defined in 1). You should provide a menu with the following options:
----------------------------------------------------------------------
IMS Developed in 2019
----------------------------------------------------------------------
A- Add a new item
C- Check if an item exists based on its category
D- Delete an existing item
L- List all existing items
Q- Quit
Instructions to resolve:
First, you have to create three classes 3:
Class 1: It is the abstract class
package Home;
public abstract class ABC {
private AttributeDataType attribute1;
...
public Method1(takes above attributes) {
this.Attribute1 = Attribute1;
...
}
}
--------------------------------------------------
Class 2: The items details
package Home;
public class DEF extends ABC {
//It may have its own attribute in addition to the abstract class attributes.
private int attrib1 ;
public DEF (all attributes)
{
super(ItemName, ItemID, ItemCategory);
this.YearsWarranty = YearsWarranty;
}
It has the get () and set () methods for its attributes and you can add additional methods if needed...
}
------------------------
Class 3: The Main Class
package Home;
import java.util.ArrayList;
import java.util.Scanner;
public static void main(String[] args) {
Scanner userInput = new Scanner(System.in);
while (true) {
System.out.println("---------------------------------------------------------");
System.out.println("| IMS Developed in 2019 |");
System.out.println("---------------------------------------------------------");
System.out.println("A- Add a new item");
System.out.println("C- Check if an item exists based on its category");
System.out.println("D- Delete an existing item");
System.out.println("L- List all existing items");
System.out.println("Q- Quit");
System.out.println("---------------------------------------------------------");
System.out.println("Please Make Your Choice");
switch (userInput.nextLine().toUpperCase()) {
case 'A': AddHouseItem(); break;
case 'C': DeleteHouseItem(); break;
case 'D': ListHouseItem(); break;
case 'L': SearchHouseItem(); break;
case 'Q': System.exit(0);
default: System.out.println("Thank You For Using Our Home Inventory Applications - See You Soon.");
}
}
public static void AddHouseItem(){
//Here you put your add house item method.
}
public static void DeleteHouseItem(){
//Here you put your delete house item method.
}
public static void ListHouseItem(){
//Here you put your list house item method
}
public static void SearchHouseItem(){
//Here you put your search house item method
}
}
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
Step: 1
Program Plan Ask the student to enter the choices A add item D delete a existing item L list all existing items Q quiet This process continuously running until student will enter Q Add item option wil...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