Question: Use a concept of Decision structure, Repetition structure, Function, Files and Exceptions, Lists / Tuples , Strings, Dictionaries / Sets and Class and Object oriented

Use a concept of Decision structure, Repetition structure, Function, Files and Exceptions, Lists/Tuples, Strings, Dictionaries/Sets and Class and Object oriented programming and Database programming SQL to write a beginners level jupyter code. "Create a Python class named MovieTheater that manages seats and tracks attendees.
Specifications:
Initialization:
When a new MovieTheater object is instantiated, it should initialize with a specific number of seats in the theater.
Reserve Seat:
Add a method called reserve_seat that allows a customer to reserve a seat.This method should accept the customer's name as a parameter.If the theater is fully booked, it should print "Theater is fully booked" and not reserve the seat.
Cancel Reservation:
Add a method called cancel_reservation that removes a reservation using the customers name.If the reservation is not found, print "Reservation not found."
Count Available Seats:
Add a method called available_seats that prints the number of remaining seats in the theater.
List Reservations:
Add a method called list_reservations that prints a list of all currently reserved customer names."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!