Abc

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

class LMS{

String name;
int id;
String email;
String course;
int books=500;
void insertData(String n, int idd, String mail, String c){
name=n;
id=idd;
email=mail;
course=c;

}
void displayStudentData(){
System.out.println("Student Name: "+name);
System.out.println("Student CMS ID: "+id);
System.out.println("Student GMAIL: "+email);
System.out.println("Student COURSE: "+course);
}
void displayLibrarybook(){
books = 1000;
System.out.println("Books available: "+books);
System.out.println();
}
void issuedBook(int b){
books=books-b;
if(books<b){
System.out.println("insufficient books in library");
}else{
System.out.println("issued books: "+b);
}}

void returnBook(int b){


books=books+b;
System.out.println("After issued Books available: "+books);
}
public static void main(String[] args){
LMS s1=new LMS();
s1.insertData("Sahil Chandawat", 1236, "sahilxy123", "Computer Science");
s1.displayStudentData();
s1.displayLibrarybook();
s1.issuedBook(100);
s1.returnBook(50);

}
}

You might also like