Create a class named DentalAppointment. Include fields for a patient’s data (use the Person class from Exercise 1), the date (using the Date class from Exercise 2), the time (use the Time class from Exercise 3), and the duration of the appointment in minutes. Also include a field that contains the ending time of the appointment; this field will be calculated based on the start time and the duration using the Time class function that adds minutes to a Time object. The DentalAppointment constructor requires a first and last name, and a month, day, year, hour, and minute for the appointment. Allow a DentalAppointment to be constructed with or without an additional argument for appointment duration, and force the duration to 30 minutes when no argument is supplied. The constructor does not allow any appointment over 240 minutes. The constructor calculates the appointment ending time based on the start time and the duration. Also include a display function for the DentalAppointment class. Write a main()function that loops at least three times, prompting the user for DentalAppointment data and displaying all the information. (Note, if you use the Person class display function, the zip code will be “X”; this is acceptable.) Figure 8-35 shows the output after a typical patient has been entered. Save the file as DentalAppointment.cpp.
Figure Typical execution of DentalAppointment

Exercise 1
Create a Person class that includes fields for last name, first name, and zip code. Include a default constructor that initializes last name, first name, and zip code to “X” if no arguments are supplied. Also include a display function. Write a main()function that instantiates and displays two Person objects: one that uses the default values, and one for which you supply your own values. Save the file as Person.cpp. You will use the Person class in other exercises.
Exercise 2
Write the class definition for a Date class that contains three integer data members: month, day, and year. Include a default constructor that assigns the date 1/1/2000 to any new object that does not receive arguments. Also include a function that displays the Date object. Write a main()function in which you instantiate two Date objects—one that you create using the default constructor values, and one that you create using three arguments—and display its values. Save the file as Date.cpp. You will use the Date class in other exercises.
Exercise 3
Create a class named Time that contains integer fields for hours and minutes. Store the hours in military time, that is, 0 through 23. Add a function that displays the fields, using a colon to separate hours and minutes. (Make sure the minutes display as two digits. For example, 3 o’clock should display as 3:00, not 3:0.) Add another function that takes an argument that represents minutes to add to the time. The function updates the time based on the number of minutes added. For example, 12:30 plus 15 is 12:45, 14:50 plus 20 is 15:10, and 23:59 plus 2 is 0:01. The Time constructor requires an argument for hours. The argument for minutes is optional; the value defaults to 0 if no argument is supplied. The constructor ensures that the hours field is not greater than 23 and that the minutes field is not greater than 59; default to these maximum values if the arguments to the constructor are out of range. Create a main()function that instantiates an array of at least four Time objects and demonstrates that they display correctly both before and after varying amounts of time have been added to them. Save the file as Time.cpp. You will use the Time class in another exercise.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.