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

Method addToStock

Programs/bookShop.java:25–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24 // function to add books to stock -
25 public void addToStock() {
26 System.out.println("Menu: ");
27 System.out.println("1. Engineering");
28 System.out.println("2. Non-fiction");
29 System.out.println("3. Fiction");
30 System.out.println("4. Children's ");
31 System.out.println("5. Comics");
32 System.out.println("6. Classics");
33 System.out.println("7. Exit");
34 do {
35 System.out.println("Enter genre of book: ");
36 ch = sc.nextInt();
37 switch (ch) {
38 case 1:
39 engg++;
40 break;
41 case 2:
42 nonfiction++;
43 break;
44 case 3:
45 fiction++;
46 break;
47 case 4:
48 childrens++;
49 break;
50 case 5:
51 comics++;
52 break;
53 case 6:
54 classics++;
55 break;
56 default:
57 if (ch != 7) {
58 System.out.println("Invalid input! Please enter correct choice!");
59 }
60 }
61 } while (ch != 7);
62 }
63
64 // function to update inventory -
65 public void updateInventory() {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected