import java.util.Scanner;
public class LibraryManagementSystem {
// Classes for Book, Student, and Library Management
static class Book {
private int sNo;
private String bookName;
private String authorName;
private int bookQty;
private int bookQtyCopy;
private String bookType; // New field for book type
public Book() {
Scanner input = new Scanner(System.in);
System.out.print("Enter Serial No of Book: ");
this.sNo = input.nextInt();
input.nextLine(); // Clear buffer
System.out.print("Enter Book Name: ");
this.bookName = input.nextLine();
System.out.print("Enter Author Name: ");
this.authorName = input.nextLine();
System.out.print("Enter Quantity of Books: ");
this.bookQty = input.nextInt();
this.bookQtyCopy = this.bookQty;
input.nextLine(); // Clear buffer
System.out.print("Enter Book Type (e.g., Fiction, Non-Fiction, Science, History): ");
this.bookType = input.nextLine(); // New input for book type
}
public int getsNo() { return sNo; }
public String getBookName() { return bookName; }
public String getAuthorName() { return authorName; }
public int getBookQty() { return bookQty; }
public int getBookQtyCopy() { return bookQtyCopy; }
public String getBookType() { return bookType; } // Getter for book type
public void addBookQty(int qty) {
this.bookQty += qty;
this.bookQtyCopy += qty;
}
}
static c