MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / updateInventory

Method updateInventory

Programs/bookShop.java:65–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64 // function to update inventory -
65 public void updateInventory() {
66 System.out.println("Menu: ");
67 System.out.println("1. Engineering");
68 System.out.println("2. Non-fiction");
69 System.out.println("3. Fiction");
70 System.out.println("4. Children's ");
71 System.out.println("5. Comics");
72 System.out.println("6. Classics");
73 System.out.println("7. Exit");
74 do {
75 System.out.println("Enter genre of book that was purchased by customer: ");
76 ch = sc.nextInt();
77 switch (ch) {
78 case 1:
79 engg--;
80 break;
81 case 2:
82 nonfiction--;
83 break;
84 case 3:
85 fiction--;
86 break;
87 case 4:
88 childrens--;
89 break;
90 case 5:
91 comics--;
92 break;
93 case 6:
94 classics--;
95 break;
96 default:
97 if (ch != 7) {
98 System.out.println("Invalid input! Please enter correct choice!");
99 }
100 }
101 } while (ch != 7);
102 }
103
104 // function to display details of book inventory -
105 public void displayInventory() {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected