(String[] args)
| 115 | } |
| 116 | |
| 117 | public static void main(String[] args) { |
| 118 | Scanner sc = new Scanner(System.in); |
| 119 | System.out.println("Welcome to book shop inventory management portal!"); |
| 120 | bookShop book = new bookShop(); |
| 121 | int choice; |
| 122 | do { |
| 123 | System.out.println("What do you want to do?"); |
| 124 | System.out.println("1. Add to stock"); |
| 125 | System.out.println("2. Update inventory"); |
| 126 | System.out.println("3. Display inventory details"); |
| 127 | System.out.println("4. Exit portal"); |
| 128 | System.out.print("Enter your choice: "); |
| 129 | choice = sc.nextInt(); |
| 130 | switch (choice) { |
| 131 | case 1: |
| 132 | book.addToStock(); |
| 133 | break; |
| 134 | case 2: |
| 135 | book.updateInventory(); |
| 136 | break; |
| 137 | case 3: |
| 138 | book.displayInventory(); |
| 139 | break; |
| 140 | default: |
| 141 | if (choice != 4) { |
| 142 | System.out.println("Invalid Input!"); |
| 143 | } |
| 144 | } |
| 145 | } while (choice != 4); |
| 146 | } |
| 147 | } |
nothing calls this directly
no test coverage detected