bookings appointemnet
USING Visual C++ .Net
B1 Design a class to represent a days bookings in an appointment book. Give to
this class an appropriate name of your choice. The class should hold the days
date and an array to represent each hour of the day for which an appointment
can be made (say nine entries, representing 9.00 to 17.00 ). Each element of the
array only needs to be able to indicate whether that hour is booked or not.
Include in the above class the following methods:
- prompt for and accept the days date
- initialise all the hours in the day to free
- repeatedly prompt the user for an hour number
- if the hour is free mark it as booked
- otherwise tell the user already booked
- display the day and its appointments
e.g.
20/12/05
9 booked
10
11 booked
12 booked
13 booked
14
15
16 booked
17
B2. Write a program to test the class produced for B1 above.
B3. Write a program by amending the program B2 above, so that as well as being able to
book a particular hour in the day, the user can request the first free hour of the day.
B4. Write a program by amending the program B2 above (this is a bit more tricky), so that the
user can make an appointment of more than one hour in length. The user enters a start hour
(e.g. 10 ) and required length in hours (e.g. 2). The program checks to see if the whole
period is free and if it is it makes the booking, otherwise it rejects it.
B5. Write a program to create a linked list of days to represent an appointment book. The
program should allow you to add and display days. It is not necessary to allow appointments
to be made.
B6. Illustrate the concept of multiple inheritance by declaring at least two subclasses of the class
produced in section B1 above and one subclass of both the above two subclasses. Give to all
these new subclasses appropriate names of your choice. Write a program to test all the
classes produced in this section.

