Travel Agency Example

It's time to take a look at an example that models the travel agency example given early in the chapter. I've created a component with a class named CSubmitOrder (seen in Listing 17.6). The class checks to see if the hotel, airline, and car reservations are okay, and then writes the information to a database.

A Visual Basic program (in Listing 17.7) is the client application that uses the component.

After the code listings, there is an explanation.

Code Listing 17.6. The CSubmitOrder Class Acts on Behalf of the Travel Agent
 // SubmitOrder.cpp : Implementation of CSubmitOrder #include "stdafx.h" #include "Travel.h" #include "SubmitOrder.h" #include "dboAirlineReservations.h" #include "dboCarReservations.h" #include "dboHotelReservations.h" ...

Get COM+ Unleashed now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.