Question: public class NetIDPortal 0 1 { / / TODO: Create an array of Items that is size 2 5 . This will be used in

public class NetIDPortal01{
// TODO: Create an array of Items that is size 25. 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
*(A-Z) using the following guide as an example for your ordering:
*
*0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
*/
public void sortItems(){
}
/**
* TODO
*
* Displaying our items is currently
import java.util.Scanner;
public class OrionAnnexInventory {
public static void main(String[] args){
new OrionAnnexInventory();
}
public OrionAnnexInventory(){
Scanner input = new Scanner(System.in);
// TODO Change the following line to be the name of your class. For
example, mine would say
// jsmit6Portal01 portal = new jsmit6Portal01();
NetIDPortal01 portal = new NetIDPortal01();
try {
System.out.println("Welcome to the \u001B[33mO\u001B[0mrion \
u001B[33mA\u001B[0mnnex "
+"\u001B[33mS\u001B[0mpace \u001B[33mI\
u001B[0mnventory "
+"\u001B[33mS\u001B[0mystem (\u001B[33mOASIS\
u001B[0m)");
Thread.sleep(1000);
System.out.println("OASIS will learn and adapt throughout its
life cycle.");
Thread.sleep(1000);
System.out.println("Some features will remain \u001B[31munusable\
u001B[0m until the more "
+ "basic features have been properly
implemented.");
Thread.sleep(2000);
} catch (InterruptedException e){
// Do nothing
}
while (true){
String message ="""
Please enter a number to determine the task for OASIS
to perform.
1: Add an Item
2: Remove an Item
3: Locate an Item
4: Sort all Items
5: \u001B[31mImport Items from ship\u001B[0m
6: \u001B[31mExport Items to ship\u001B[0m
7: \u001B[31mCreate Priority List\u001B[0m
8: Display all Items
0: Exit the system
""";
System.out.println(message);
try {
int choice = Integer.parseInt(input.nextLine());
switch (choice){
case 1:
portal.addItem();
break;
case 2:
portal.removeItem();
break;
case 3:
portal.locateItem();
break;
case 4:
portal.sortItems();
break;
case 5:
case 6:
case 7:
try {
System.out.println("\u001B[33mThis
feature is not yet available. "
+ "Previous features need
verified before unlocking.\u001B[0m");
Thread.sleep(1000);
} catch (InterruptedException e){
}
break;
case 8:
portal.displayItems();
break;
case 0:
System.out.println("\u001B[32mThank you for
using OASIS. "
+"\u001B[31mThe system will now
shut down ....\u001B[0m");
input.close();
System.exit(0);
default:
try {
System.out.println("\u001B[33mNo valid
number was entered. "
+ "Please check your input
and try again.\u001B[0m");
Thread.sleep(2000);
} catch (InterruptedException e){
// Do nothing
}
}
} catch (NumberFormatException e){
try {
System.out.println("\u001B[33mPlease be careful and
enter only numbers.\u001B[0m");
Thread.sleep(2000);
} 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 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!