Question: Write a pseudo code function in terms of the ADT appointment book, described in Section 1.4.1, for each of the following tasks. Do you need
Write a pseudo code function in terms of the ADT appointment book, described in Section1.4.1, for each of the following tasks. Do you need to add operations to the ADT to perform these tasks?a. Change the purpose of the appointment at a given date and time.b. Display all the appointments for a given date.
Example:

bstraction: The Walls how to accomplish th ointment book apptBook. The following pseudocode indicates ng the previous ADT operations: Get the folowing data from the user: oldDate oldrine, newDate, newTime / Get purpose of appointment oldPurpose apptBook.getAppointment Purpose(oldDate, oldTime) if (oldPurpose is not the empty string) Change the date or time of an appointment 1 See whether a new date/time is available if (apptBook.isAppointment (nenDate, newTime)) New date/time is booked write("You already have an appointment at ", newTime, "on ", newDate) else / New datertime is available; cancel old uppointment; make new one. apptBook.cancelAppointment (oldDate, oldTime) if (apptBook.nakeAppointnent (newDate, newTime, oldPurpose)) writeC"Your appointnent has been rescheduled to". newTime, " on", newDate) else write("You do not have an appointment at ", oldTime, on, oldDate) Again n ADT is implemented. The exercise can perform with this ADT ce that you can design applications that use ADT operations without s at the end of this chapter provide examples of 1.4.2 ADTs That Suggest Other ADT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
