Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this i s m y code ( i n phyon ) i m not sure what t o d o after all o f this

this ismy code (in phyon)im not sure what todo after all of this i dont have a direction togo.this is the promt:Project Outline:
Inheritance:
Student Project Handout: Boutique Hotel Management System Objective: Develop a comprehensive Python application for managing a boutique hotel's operations, focusing on room bookings, customer management, and amenities tracking. This project will integrate concepts of inheritance, recursion, GUI programming with tkinter, and database programming with SQLite, providing a hands-on experience in applying these programming techniques to a business context. Project Outline: 1. Inheritance: Design a class hierarchy for managing different types of hotel rooms (e.g., standard, deluxe, suite) with common attributes and methods in a base class and specific features in derived classes. 2. Recursion: Use recursion to calculate total earnings from bookings over a period or to find available rooms matching specific criteria. 3. GUI Programming: Implement a tkinter-based interface for hotel staff to add, update, view, and delete bookings, customer details, and room statuses. 4. Database Integration: Utilize SQLite for persisting hotel data, including customer information, room details, and booking records, with CRUD operations. Features: Booking System: Interface for making and managing room bookings. Customer Management: Add, view, and update customer profiles. Room Management: Display room availability and details. Amenities Tracking: Keep track of amenities provided to each room. Financial Reports: Generate reports on bookings, cancellations, and income:
this is what i have :
import tkinter
import tkinter.messagebox
import sqlite3
class HotelRoom:
def __init__(self, room_type, room_number, number_of_beds, max_occupancy, pet_policy, num_bathroom, amenities, available_booking):
self.room_type = room_type
self.room_number = room_number
self.number_of_beds = number_of_beds
self.max_occupancy = max_occupancy
self.pet_policy = pet_policy == 'TRUE'
self.num_bathroom = num_bathroom
self.amenities = amenities # Corrected line
self.available_booking = available_booking == 'TRUE'
def __str__(self):
return f"Room {self.room_number}- Type: {self.room_type}, Available: {self.available_booking}"
class Hotel:
def __init__(self, name):
self.name = name
self.rooms = self.load_rooms()
def load_rooms(self):
# Hardcoded room data
rooms_data =[
{"room_type": "Standard", "room_number": "101", "number_of_beds": 1, "max_occupancy": 2, "pet_policy": "FALSE", "num_bathroom": 1, "amenities": ["TV", "Wifi"], "available_booking": "TRUE"},
{"room_type": "Deluxe", "room_number": "201", "number_of_beds": 2, "max_occupancy": 4, "pet_policy": "TRUE", "num_bathroom": 2, "amenities": ["TV", "Mini Fridge", "Balcony"], "available_booking": "TRUE"},
# Add more rooms here if needed
]
rooms =[HotelRoom(**data) for data in rooms_data]
return rooms
def list_available_rooms(self):
available_rooms =[room for room in self.rooms if room.available_booking]
print(f"Listing all available rooms ({len(available_rooms)} available):")
return available_rooms
class MyGUI:
def __init__(self):
self.main_window = tkinter.Tk()
self.top_frame = tkinter.Frame(self.main_window)
self.bottom_frame = tkinter.Frame(self.main_window)
self.radio_var = tkinter.IntVar()
self.radio_var.set(1)
self.rb1= tkinter.Radiobutton(self.top_frame, text='Add Bookings', variable=self.radio_var, value=1)
self.rb2= tkinter.Radiobutton(self.top_frame, text='Update Bookings', variable=self.radio_var, value=2)
self.rb3= tkinter.Radiobutton(self.top_frame, text='Delete Bookings', variable=self.radio_var, value=4)
self.rb4= tkinter.Radiobutton(self.top_frame, text='Customer Details', variable=self.radio_var, value=5)
self.rb5= tkinter.Radiobutton(self.top_frame, text='Room Status', variable=self.radio_var, value=6)
self.rb6= tkinter.Radiobutton(self.top_frame, text="Amenities", variable=self.radio_var, value=7, command=self.open_amenities_window)
self.rb1.pack()
self.rb2.pack()
self.rb3.pack()
self.rb4.pack()
self.rb5.pack()
self.rb6.pack()
self.ok_button = tkinter.Button(self.bottom_frame, text='OK', command=self.show_choice)
self.quit_button = tkinter.Button(self.bottom_frame, text='Quit', command=self.main_window.destroy)
self.ok_button.pack(side='left')
self.quit_button.pack(side='left')
self.top_frame.pack()
self.bottom_frame.pack()
tkinter.mainloop()
def show_choice(self):
choice = self.radio_var.get()
if choice ==
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions