Mathan Cs Project 1
Mathan Cs Project 1
BY
MATHAN BABU.M.K
Class XII-A
COMPUTER SCIENCE INVESTIGATORY
PROJECT
PROJECT REPORT
Submitted On
SUBMITTED BY
MATHAN BABU
CLASS: XII-A
CERTIFICATE
Principal signature
INDEX
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
LIBRARY DATA MANAGEMENT SYSTEM
About the project
In the evolving landscape of information management, the need for efficient and
organized library systems is more crucial than ever. The creation of a robust
Library Management System (LMS) is not only a technological challenge but
also an opportunity to streamline the management of vast collections of literary
works. In this project, we embark on the journey of developing a Library
Management System utilizing the power of binary files.
Easy-to-read − Python code is more clearly defined and visible to the eyes.
A broad standard library − Python's bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.
Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.
Portable − Python can run on a wide variety of hardware platforms and has
the same interface on all platforms.
-addBook()
This function opens a binary file
Takes input as bookid,bookname,authorname,price and copies,and then adds it
in the opened file
In their respective fields.
-modifyBook()
This functionsgets bookid as input and modifies that bookidby replacing it with
the new details in the respective fields.
-deleteBook()
it takes input as bookid and deletes the following details.
-searchBook()
It searches the record needed by the user and shows it.
-listallbooks()
It lists all the records.
HARDWARE AND SOFTWARE REQUIREMENTS
Hardware
Following are the hardware specifications that is required to develop this
project is as follows:
1. Computer components like Monitor, Keyboard, Mouse, CPU, Keyboard.
2. Minimum 1 GB ram for smooth working of application.
3. 250 GB Hard Disk or More. CD ROM Drive.
Software
This is in contrast to physical hardware, from which the system is build and
actually performs the work.
∙ Front End- Python
∙ Text Editors- VS Code Editor Operating System
∙ Windows10
∙ Ubuntu Linux
PYTHON OVERVIEW
A binary file is a computer file that contains data in a format composed of ones
and zeros. Unlike text files, which store data in a human-readable form, binary
files store data in a form that is not easily interpreted by humans. These files can
represent a wide range of data types, including images, audio, video,
executables, and more.
Binary files are typically used for storing information that is not in a plain text
format and requires specific applications or tools to interpret and process the
data correctly. Examples of binary file formats include:
Executable Files (.exe): These files contain machine code that can be executed
by a computer's processor. They are commonly used to distribute software
applications.
Image Files (e.g., .jpg, .png, .gif): Binary files that store pixel information for
images. Each pixel's color and other attributes are represented using binary data.
Audio Files (e.g., .mp3, .wav): Binary files storing audio information, such as
music or voice recordings.
Video Files (e.g., .mp4, .avi): Binary files containing video data, often
compressed using various codecs.
Database Files: Binary files used by database systems to store structured data
efficiently.
When working with binary files, it's essential to use appropriate software or
programming languages that can handle the specific file format. Hexadecimal
editors or specialized programs designed for each file type are often used to
view or modify binary files directly. Programming languages like C, C++, and
Python provide tools and libraries for working with binary data at a lower level.
Keep in mind that attempting to open and modify a binary file without
understanding its structure and format can lead to data corruption or unintended
consequences.
Database and Table design
Database Name :
a) library.dat
1 bookid Integer
2 bookname String
3 bookauthor String
4 Price
5 copies
b) temp.dat
c) Member.dat
1 memid Integer
2 memname String
3 booklend String
4 borrowdate
5 returndata
6 Fine
SOURCE CODE
class Flight:
self.flight_id = flight_id
self.source = source
self.destination = destination
self.departure_time = departure_time
self.arrival_time = arrival_time
self.price = price
self.seats_available = 100
def display_flight_details(self):
print(f"Source: {self.source}")
print(f"Destination: {self.destination}")
print(f"Price: ${self.price}")
class Passenger:
self.name = name
self.email = email
self.phone_number = phone_number
class BookingSystem:
def __init__(self):
self.flights = []
self.passengers = []
self.bookings = []
self.flights.append(flight)
self.passengers.append(passenger)
if flight.seats_available > 0:
flight.seats_available -= 1
self.bookings.append((passenger, flight))
else:
flight.seats_available += 1
self.bookings.remove((passenger, flight))
else:
print(f"Passenger: {passenger.name}")
flight.display_flight_details()
print()
def main():
booking_system = BookingSystem()
while True:
print("6. Exit")
if choice == "1":
booking_system.add_flight(flight)
booking_system.add_passenger(passenger)
booking_system.book_ticket(passenger, flight)
else:
else:
booking_system.display_bookings()
break
else:
if __name__ == "__main__":
main()
OUTPUT SCREEN
BIBLIOGRAPHY
1. Progress in Computer Science with Python
- Dhanpat Rai & Co [ Publisher ]
- Sumita Arora [ Author ]
3. Computer Science
- New Saraswathi House [ Publisher ]
- Reeta Sahoo & Gagan Sahoo[ Author ]