0% found this document useful (0 votes)
39 views20 pages

Brian Jacob and Kiran Biju Python Project

lkjhg jk, k olknm,'

Uploaded by

9438
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views20 pages

Brian Jacob and Kiran Biju Python Project

lkjhg jk, k olknm,'

Uploaded by

9438
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

COMPUTER SCIENCE

PROJECT

AUDITORIUM
MANAGEMENT
SYSTEM

1|Page
STUDENT PARTICULARS

NAME : Kiran Biju and Brian Jacob

CLASS : XI - A

ACADEMIC YEAR : 2023-2024

SCHOOL : Sunrise English Private school

NAME OF THE TEACHER : Mrs. ASHWATHY

SIGNATURE :

INDEX
2|Page
SL NO TOPIC PAGE NO
1 Acknowledgement 4
2 Aim 5
3 Brief Explanation 6
4 Source code 7-13
5 Output 14-15
6 Conclusion 16
7 Advantages and 17-18
disadvantages

3|Page
ACKNOWLEDGEMENT

In the accomplishment of this project successfully,


many people have bestowed upon me their
blessings and their heart-felt support, and so, I
would like to thank all those people who have been
concerned with project.
Firstly, I thank God for being able to complete this
project with success. Then I would like to thank my
principal, Mr.Thakur Mulchandani, and Computer
Science teacher, Ms. Ashwathy, whose valuable
guidance that has been the ones to help me
complete this project.
I would also like to thank my parents and friends
who have helped me with their valuable
suggestions and guidance has been helpful in
various phases of completion of project.

4|Page
AIM

The program is based upon ‘auditorium


hall online booking platform’, which is a
much widely used system In today’s day
and age .

5|Page
BRIEF EXPLAINATION
This code creates an `Auditorium` class with
attributes such as name, capacity, price per hour,
and bookings. It also creates a `Booking` class with
attributes such as auditorium, date, start time, end
time, customer name, customer email, and catering
requirement. The `main()` function creates an
instance of the `Auditorium` class and provides a
menu for the user to view available hours, book the
auditorium, contact staff for inquiry, or exit the
program. The user can input the date, start time,
end time, customer name, customer email, and
catering requirement to book the auditorium. The
program checks for the availability of the
auditorium at the given date and time and
calculates the total cost of the booking. The user
can contact the staff for further inquiry.

6|Page
SOURCE CODE
import datetime

class Auditorium:
def __init__(self, name, capacity, price_per_hour):
self.name = name
self.capacity = capacity
self.price_per_hour = price_per_hour
self.bookings = []

def add_booking(self, booking):


self.bookings.append(booking)

def get_available_hours(self, date):


available_hours = []

7|Page
for hour in range(8, 22):
available_hours.append(datetime.datetime(date.year,
date.month, date.day, hour))
for booking in self.bookings:
if booking.date == date:
if booking.start_time in available_hours:
available_hours.remove(booking.start_time)
if booking.end_time in available_hours:
available_hours.remove(booking.end_time)
return available_hours

class Booking:
def __init__(self, auditorium, date, start_time, end_time,
customer_name, customer_email, catering_required):
self.auditorium = auditorium
self.date = date
self.start_time = start_time
self.end_time = end_time
self.customer_name = customer_name
8|Page
self.customer_email = customer_email
self.catering_required = catering_required

def get_cost(self):
duration = self.end_time - self.start_time
hours = duration.seconds // 3600
return hours * self.auditorium.price_per_hour

def main():
auditorium = Auditorium("Sagymon Auditorium", 100,
100000)
time = datetime.datetime.now()
print(f"\n\tWELCOME TO {auditorium.name} BOOKING
SYSTEM!\n")
print(f"\tCurrent date and time: {time}")

while True:
print("""
******** Sagymon Auditorium Booking System ********
9|Page
1. View Available Hours
2. Book Auditorium
3. Contact Staff for Inquiry
4. Exit the program
""")

try:
choice = int(input("Enter your choice: "))
except ValueError:
print("Please enter a number!")
continue

if choice == 1:
date_str = input("Enter date (YYYY-MM-DD): ")
try:
date = datetime.datetime.strptime(date_str, "%Y-%m-
%d").date()
except ValueError:
print("Invalid date format!")
10 | P a g e
continue
available_hours = auditorium.get_available_hours(date)
print(f"Available hours on {date_str}:")
for hour in available_hours:
print(hour.strftime("%H:%M"))

elif choice == 2:
date_str = input("Enter date (YYYY-MM-DD): ")
try:
date = datetime.datetime.strptime(date_str, "%Y-%m-
%d").date()
except ValueError:
print("Invalid date format!")
continue
available_hours = auditorium.get_available_hours(date)
print(f"Available hours on {date_str}:")
for hour in available_hours:
print(hour.strftime("%H:%M"))
start_time_str = input("Enter start time (HH:MM): ")
11 | P a g e
try:
start_time =
datetime.datetime.strptime(start_time_str, "%H:%M").time()
except ValueError:
print("Invalid time format!")
continue
end_time_str = input("Enter end time (HH:MM): ")
try:
end_time = datetime.datetime.strptime(end_time_str,
"%H:%M").time()
except ValueError:
print("Invalid time format!")
continue
if datetime.datetime.combine(date, end_time) <=
datetime.datetime.combine(date, start_time):
print("End time must be after start time!")
continue
if datetime.datetime.combine(date, start_time) not in
available_hours or datetime.datetime.combine(date, end_time)
not in available_hours:
12 | P a g e
print("Selected time is not available!")
continue
customer_name = input("Enter your name: ")
customer_email = input("Enter your email: ")
catering_required = input("Do you require catering?
(yes/no): ")
booking = Booking(auditorium, date,
datetime.datetime.combine(date, start_time),
datetime.datetime.combine(date, end_time), customer_name,
customer_email, catering_required)
auditorium.add_booking(booking)
cost = booking.get_cost()
print(f"Booking successful! Total cost: {cost}, Contact us
at 050-2371983 regarding the payment details and the terms of
use of our auditorium.")

elif choice == 3:
print("Contact our Manager at 050-2371983 or through
our email sagymonauditorium@gmail.com for any inquiry.")

13 | P a g e
elif choice == 4:
break

else:
print("Please enter a choice between 1-4 only!")

if __name__ == "__main__":
main()

14 | P a g e
OUTPUT
• View available hours-

• Online booking

15 | P a g e
• Contacting staff

16 | P a g e
17 | P a g e
CONCLUSION

This program is a very efficient, quick and simple


at its coding, which does various tasks.
The program it is an epitome of user-friendly
interactive programs, which at each step allows
you to check or edit any detail.
Working on this program has allowed me to
explore elements in Python, which has increased
my in-depth knowledge of programming.

18 | P a g e
ADVANTAGES OF PYTHON

1.Versatile, Easy to Use and Fast to Develop


2.Extensive Support Libraries
3.Presence of Third Party Modules:
4.User-friendly Data Structures:
5.Great productivity and speed
6.Easy to read and learn
7.Wide Applicability

19 | P a g e
DISADVANTAGES OF PYTHON

1.Difficulty in Using Other Languages


2.Underdeveloped Database Access Layers
3.Speed Limitations
4.Not Native to Mobile Environment
5.Large Memory Consumption
6.Not suitable for Mobile and Game
Development

20 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy