June 2002
Intermediate to advanced
864 pages
18h 35m
English
At this point we have covered more than enough material for you to understand the database version of the Customer and HotelBroker objects in the case study. As usual, the code is in the CaseStudy directory for this chapter.
Since there will never be any reason for the Customer object to hold any state, the Customer object methods use SqlDataReader to access the database and return the results. Any state that a program might need (i.e., a list of customers) could easily be maintained in the client program and not in a middle-tier object.
The HotelBroker and HotelBookings objects are a little more complicated. As mentioned earlier, for pedagogical reasons alone, these objects would have been implemented using a
Read now
Unlock full access