/** * Created by leon on 1/10/18. */ public class MainApplication { public static void main(String[] args) { InventoryManager system = new InventoryManager(); String temp; int tempPrice; int tempOnHand; boolean onOff = true; System.out.println("Welcome to the inventory tracker.\n"); while(onOff = true){ switch(system.getStringInput("What Would You Like To Do?\n" + "ADD product\n" + "ADD INVENTORY of an existing product \n" + "DISPLAY all current products\n" + "REMOVE a product from the system\n" +"EXIT the system\n")){ case "add" : temp = system.getStringInput("What Product Are You Adding?"); tempPrice = system.getIntegerInput("What Is The Product's Price?"); tempOnHand = system.getIntegerInput("How Many Do You Have?"); system.addProduct(temp,tempPrice,tempOnHand); break; case "add inventory" : temp = system.getStringInput("What Product Are You Adding Inventory To?"); tempOnHand = tempOnHand = system.getIntegerInput("How Much Are You Adding?"); system.addInventory(temp,tempOnHand); break; case "display" : system.displayInventory(); break; case "remove" : temp = system.getStringInput("Which Product Do You Want To Remove?"); system.removeProduct(temp); break; case "exit" : onOff = false; break; default: System.out.println("Invalid Choice: Please Try Again"); break; } } System.out.println("Goodbye"); } }