Question: Python Course (please make as simple as possible. Any help greatly appreciated) WILL GIVE THUMBS UP Part A Write a definition line for a class

Python Course

(please make as simple as possible. Any help greatly appreciated)

WILL GIVE THUMBS UP

Python Course (please make as simple as possible. Any help greatly appreciated)

Part A Write a definition line for a class AppointmentBook and a one-line doc string that describes what an AppointmentBook is. AppointmentBook objects are able to track multiple appointments on any day of the week using two pieces of information for each appointment: 1. what day of the week the appointment is on (a string, such as "Monday") 2. a description stating, for example, who the appointment is with (a string, such as "Dentist") Implement the following methods (functions) for the class AppointmentBook: 1. An initialization method. The initialization method creates a dictionary attribute, appointments, for the AppointmentBook object being created, and initializes it to the empty dictionary. A method named addAppointment. This method takes the day of the week, and an appointment description as string parameters. It adds the appointment, keyed by day of the week, to the list of appointments scheduled on the given day of the week provided the appointment is not already scheduled on that day. A method named isScheduled. This method takes an appointment description as a string parameter. It returns the Boolean value True if the appointment is scheduled on any day of the week; False otherwise 2. 3. Part B Assume that the code for the class AppointmentBook (Part A) has been saved in a file named appointmentbook.py. Write code that performs the following tasks (each task takes one line of code): 1. import the module that defines the class AppointmentBook 2. create an AppointmentBook object 3. schedule an appointment with your "Dentist" on Monday 4. schedule an appointment with your "Personal Trainer" on Saturday 5. check whether you have an appointment scheduled with your "Physician

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 Databases Questions!