Here’s a simplified example:
class Appointment:
def __init__(self, patient_name, appointment_time):
self.patient_name = patient_name
self.appointment_time = appointment_time
self.confirmed = False
def schedule_appointment(self):
# Logic for scheduling an appointment
self.confirmed = True
def reschedule_appointment(self, new_time):
# Logic for rescheduling an appointment
self.appointment_time = new_time
def cancel_appointment(self):
# Logic for canceling an appointment
self.confirmed = False