Java Microproject PDF
Java Microproject PDF
A PROJECT REPORT
LIBRARY MANAGEMENT SYSTEM
Submitted by
Roll No.______________________
Roll No.______________________
Roll No.______________________
THANK YOU…!!!!
Part – A
Micro-Project Report
The purpose of this project is to use various concepts of java and develop a program.
Micro-Project Report
From this project we came to know about many different concepts in java.
Application of this project is that we can use this library management in an library.
A project report
Program code:
package com.company;
import java.util.Scanner;
import java.util.ArrayList;
void addBook(){
System.out.println("Enter the book name you want to add: ");
String temp = sc.nextLine();
array.add(temp);
noOfBooks++;
System.out.println("Book has be successfully added");
this.displayBooks();
}
void displayBooks(){
System.out.println("The list of available books is: ");
for (String item: this.array) {
if (item == null){
continue;
}
System.out.println(" * " +item);
}
}
}
@Override
void register(){
System.out.println("Enter your name: ");
names.add(sc.nextLine());
//sc.nextLine();
System.out.println("** Registration successful **");
}
void displayUsers(){
System.out.println("Displaying all the registered people");
for (String name: names){
System.out.println(" * "+name);
}
}
void issueBook(){
System.out.println("Enter the name of book you want to issue: ");
String bookName = sc.nextLine(); //sc.nextLine();
System.out.println("Enter the name who wants to issue the book: ");
String name = sc.nextLine();
void returnBook(){
System.out.println("Enter the book name you want to return: ");
String returnName = sc.nextLine();
array.add(returnName);
System.out.println(returnName+ " book has be returned
successfully");
}
}
Program output:
Concepts used in program:
7. Public static void main (string [] args): Public static void main (string [] args)
is java main method and is the entry point of any java program.
9. Method: A method is a block of code which only runs when it is called. You
can pass data, known as parameters, into a method. They are also known as
functions.
Working of program:
When the program starts to execute it first goes to main method called public
static void main (Strings [] args) and then it takes the input from user.
Then you have to enter your choice from
Register
Addbook
Issuebook
Returnbook
Display All Available Books
Display Registered people
After you have entered your choice then while loop gets started. It calls the
various method that we have used in our program.
Methods used in program:
add (); = To add books in the library.
displayBooks (); = To display the available books.
Register (); = To enter the name of user.
displayusers (); = To display the names of users.
Issuebook (); = The book which you want to issue and who wants to
issue.
Returnbook (); = To return the book.
Conclusion:
We developed a small software using java about library management system.
Reference:
www.google.com
www.javatpoint.com
www.wschoolsjava.com