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

Smt.

Sharchchandrika Suresh Patil Institute of


Technology Chopda
Computer engineering department

2021-22

Java (Subject Code:-22412)

Microproiect Topic
Library Management System

Guided By
Prof. D.M.Fegade

Submitted By
Name:-Aishwarya Ishwardas Pingale
Enrollment no:-2000610009

Name:-Snehal Ulhas Deshmukh


Enrollment no:-2000610095

Name:-Maheshwari Hemant Sutar


Enrollment no:-2000610014
CERTIFICATE
MAHARASHTRA STATE BOARD OF TECHNICAL,
MUMBAI.
Smt sharadchandrika suresh patil institute of Technology

This is to certify that the following student

Name:- Aishwarya Pingale

Name:-Snehal Deshmukh

Name:-Maheshwari Sutar

Of Fourth semester of diploma in computer of institute Smt


sharadchandrika suresh patil institute of Technology chopada have completed
the micro – project Work satisfactorily under my supervision guidance in Java
programming the academic year 2021-2022 as prescribed in the I-Scheme
curriculum.

(Guide:prof. D.M.Fegade) H.O. D Principal


ACKOWLEDGEMENT

We Wish to express our profound and sincere gratitude to our guide by


Prof.D.M.Fegade Who Guided us into the intricacies of this micro-project non-
clamantly with matchless magnanimity. We are indebted to her constant
encouragement cooperation and help. It was her enthusiastic support that helped
us in overcoming the various obstacles in this project.

We would also like to express our thankfulness to our beloved principal


H.O.D. and other faculty members of our Second Year Department for extending
their support and motivation.

Finally, we would be failing in our duty, if we don’t acknowledge the


cooperation rendered during various stages of this micro-project by

THANK YOU…!!!!
Part – A

Micro-Project Report

Library Management System

1.0 Aims of the Micro-Project :

The purpose of this project is to use various concepts of java and develop a program.

2.0 Course Outcomes Address :

• We learnt object oriented methodology.


• To use concepts.
• To develop our logic in right sense.

3.0 Proposed Methodology :

When we decided to do this micro-project first we search the information


about The topic with the help of Internet. And we developed the program and the report.
Finally we made our project with Good co-ordination and Hardworking.

4.0 Resources Required :

S. No. Name of Resource/material Specifications Qty Remarks


1 Software Intellij -
2 Laptop Windows 2010 1
Part - B

Micro-Project Report

Library Management System


1.0 Rationale :
Java is object-oriented language means it follows a programming style that includes
concept such as class, object, inheritance and much more. This enhances the coding structure
making java highly relatable. Additionally, developing OOP based apps is easier as it helps
keeps the system flexible and sustainable.

2.0 Aims of Micro-Project :


The purpose of this project is to use various concepts of java and develop a program.

3.0 Course Outcomes Addressed :

• We learnt object oriented methodology.


• To use concepts.
• To develop our logic in right sense.

4.0 Literature Review :


www.wikipedia.com
www.javatpoints.com
www.google.com

5.0 Actual Methodology Followed :

When we decided to do this micro-project first we search the information about


The topic with the help of Internet. And we developed the program and the report. Finally
we made our project with Good co-ordination and Hardworking.
.
6.0 Actual Resources Used :

S. Name of Specifications Qty Remarks


No. Resource/material
1 Intellij-idea Windows -
10
2 Refrence books Tech-Max 1

7.0 Skill Developed / Learning outcome of this Micro-Project :

From this project we came to know about many different concepts in java.

8.0Applications of this Micro-Project :

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;

abstract class Book{


int noOfBooks = 0;
ArrayList<String> array = new ArrayList<>();
Scanner sc = new Scanner(System.in);

abstract void register();

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);
}
}
}

class Library extends Book{


ArrayList<String> names = new ArrayList<>();

@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();

for (int i = 0; i < noOfBooks; i++){


if (array.contains(bookName) && names.contains(name)){
System.out.println(bookName+" issued successfully to
"+name);
array.remove(bookName);
}
}
}

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");
}
}

public class LibraryManagement {


public static void main(String[] args) {

Library l1 = new Library();


Scanner sc = new Scanner(System.in);
int choice = 0;
System.out.println("Welcome to the Library!!");

System.out.println("Choose the task you want to perform");


System.out.println("1. Register");
System.out.println("2. Add Book");
System.out.println("3. Issue Book");
System.out.println("4. Return Book");
System.out.println("5. Display All Available Books");
System.out.println("6. Display Registered people");
while (true) {
System.out.println("Enter your choice: ");
choice = sc.nextInt();
if (choice == 1) {
l1.register();
} else if (choice == 2) {
l1.addBook();
} else if (choice == 3) {
l1.issueBook();
} else if (choice == 4) {
l1.returnBook();
} else if (choice == 5) {
l1.displayBooks();
} else if (choice == 6) {
l1.displayUsers();
} else {
System.out.println("Invalid choice");
}
}
}
}
Program output:
Concepts used in program:

1. Import java.util.Scanner: This means import the scanner class which is


defined inside util folder inside java folder. And it is the easiest way to read
input in java.

2. Import java.util.ArrayList: Array List is a dynamic data structure; it provides


constant time for search operation.

3. Class: A class is used to describe one or more objects.

4. Abstract Class: Abstract class is a restricted class that cannot be used to


create objects (to access it, it must be inherited from another class).

5. Abstract Method: Abstract method can only be used in an abstract class,


and it does have any body. The body is provided by the subclass (inherited
from).

6. System.out.println: To print the output.

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.

8. Object: Each object is an instance of a particular class or subclass with the


class’s own methods or procedures and data variables.

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

You might also like