Question: public class NetIDPortal 0 1 { / / TODO: Create an array of Items that is size 2 5 . This will be used in
public class NetIDPortal
TODO: Create an array of Items that is size This will be used in all
methods below.
TODO
This method will prompt the user to choose a type of item to add. Once the
user selects the type of item to add all information about that item will
be
gathered and packaged into an object. That object will then be saved into
our
inventory system array.
Our system has limited storage until we can find some key components. For
the immediate future we will categorize our items based on the drawing
provided.
public void addItem
TODO
This method will prompt the user for an item that they wish to remove.
This
item will be referred to by its name only for now.
If the item is found, remove it from the inventory and let the user know.
If
not item is found with that name, alert the user that it could not be
found
or removed.
public void removeItem
TODO
This method will prompt the user for an item that they wish to locate.
If the item exists within the system let the user know all of the
information
about that item. If the item does not exist within the system, alert the
user
that the item cannot be found.
Do not sort the inventory before searching. Perform this task using a
linear
search.
public void locateItem
TODO
Due to our limited technology, we will be sorting this list using the
Bubble
Sort.
We understand this approach is NOT ideal for the future, but it will work
for
now.
We want to be able to sort all of the Items by their name in ascending
order
AZ using the following guide as an example for your ordering:
AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
public void sortItems
TODO
Displaying our items is currently
import java.util.Scanner;
public class OrionAnnexInventory
public static void mainString args
new OrionAnnexInventory;
public OrionAnnexInventory
Scanner input new ScannerSystemin;
TODO Change the following line to be the name of your class. For
example, mine would say
jsmitPortal portal new jsmitPortal;
NetIDPortal portal new NetIDPortal;
try
System.out.printlnWelcome to the uBmOuBmrion
uBmAuBmnnex
uBmSuBmpace uBmI
uBmnventory
uBmSuBmystem uBmOASIS
uBm;
Thread.sleep;
System.out.printlnOASIS will learn and adapt throughout its
life cycle.";
Thread.sleep;
System.out.printlnSome features will remain uBmunusable
uBm until the more
"basic features have been properly
implemented.";
Thread.sleep;
catch InterruptedException e
Do nothing
while true
String message
Please enter a number to determine the task for OASIS
to perform.
: Add an Item
: Remove an Item
: Locate an Item
: Sort all Items
: uBmImport Items from shipuBm
: uBmExport Items to shipuBm
: uBmCreate Priority ListuBm
: Display all Items
: Exit the system
;
System.out.printlnmessage;
try
int choice Integer.parseIntinputnextLine;
switch choice
case :
portal.addItem;
break;
case :
portal.removeItem;
break;
case :
portal.locateItem;
break;
case :
portal.sortItems;
break;
case :
case :
case :
try
System.out.printlnuBmThis
feature is not yet available.
"Previous features need
verified before unlocking.uBm;
Thread.sleep;
catch InterruptedException e
break;
case :
portal.displayItems;
break;
case :
System.out.printlnuBmThank you for
using OASIS.
uBmThe system will now
shut down uBm;
input.close;
System.exit;
default:
try
System.out.printlnuBmNo valid
number was entered.
"Please check your input
and try again.uBm;
Thread.sleep;
catch InterruptedException e
Do nothing
catch NumberFormatException e
try
System.out.printlnuBmPlease be careful and
enter only numbers.uBm;
Thread.sleep;
catch InterruptedException f
Do nothing
I have provided you with a switchboard that I have found that the original
researchers started building for their inventory system. This switchboard is what will
control your program, and because it is hard wired with circuitry it cannot be
modified. To help start you on the right track I have also built you a portal to
interact with this switchboard. I dont have time to build the entire system for you,
but I have outlined the things we need to build. Some of this has been put into code,
while other parts I havent had time to implement. I did find what appears to be a
class diagram that we will use to better integrate into the existing system.
Your task is to follow the instructions inside of the portal I have given you to
complete each task.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
