A good travel agent is expected to check that a customer does not accidentally e
ID: 3839936 • Letter: A
Question
A good travel agent is expected to check that a customer does not accidentally end up with mismatched reservations, such as a flight from NY to Rome and hotel reservation in Karachi on the same night. Thus, there is a need to implement the responsibility "check trip" that flags itineraries with mismatched reservations. These flagged itineraries require special attention. Consider these statements about the assignment of this responsibility: I. The Ticket and HotelReservation class are jointly responsible for carrying out the "check trip" responsibility. II. The "check trip" responsibility must lie with the Trip class. III. It is useless to implement the responsibility because some customers might get a rental car and drive to an unknown destination. Which of the choices above describe suitable design decision(s) for the travel agency's itinerary system? Why? a. I only b. II only c. III only d. I and II only e. I, II, and IIIExplanation / Answer
Solution:
d) I and II seems more legit, because along with the Hotel Reservation class the Ticket class also held responsible for this. and it is not useless to implement the responsibility in case someone is going there by rental car then this information must be kept into Trip class and it's the responsibility of trip class, because of this II one is also true.
I hope this helps. Don't forget to give a thumbs up if you like this.