| 103 | |
| 104 | // function to display details of book inventory - |
| 105 | public void displayInventory() { |
| 106 | System.out.println("Displaying inventory details: "); |
| 107 | System.out.println("Number of books available in inventory - "); |
| 108 | System.out.println("Genre \t No. of books"); |
| 109 | System.out.println("Engineering: \t" + engg); |
| 110 | System.out.println("Non-Fiction: \t" + nonfiction); |
| 111 | System.out.println("Fiction: \t" + fiction); |
| 112 | System.out.println("Children's: \t" + childrens); |
| 113 | System.out.println("Comics: \t" + comics); |
| 114 | System.out.println("Classics: \t" + classics); |
| 115 | } |
| 116 | |
| 117 | public static void main(String[] args) { |
| 118 | Scanner sc = new Scanner(System.in); |