Skip to content

Commit

Permalink
Define method for ticket reservation/generator
Browse files Browse the repository at this point in the history
  • Loading branch information
angeljmercado committed Aug 22, 2023
1 parent d9cc7e6 commit 676b68a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Hotel:
def __init__(self, hotel_id):
self.hotel_id = hotel_id
pass
self.name = df.loc[df["id"] == self.hotel_id, "name"].squeeze()

def book(self):
"""Books a hotel by changing the available field in the database to no"""
Expand All @@ -22,13 +22,22 @@ def available(self):

class TicketReservation:
def __init__(self, name, hotel):
pass
self.name = name
self.hotel = hotel

def generate(self):
pass
content= f"""
Thank you for your reservation!
Here is the booking information:
Name: {self.name}
Hotel: {self.hotel.name}"""
return content


print(df)
hotel_id = input("Enter the id of the hotel: ")
hotel = Hotel(hotel_id)

if hotel.available():
hotel.book()
name = input("Enter your name: ")
Expand Down

0 comments on commit 676b68a

Please sign in to comment.