1. A customer has itineraries. Does this mean, create, changes and payments to itineraries will occur through a customer object?? In PaymentHandler class, for eg: Customer cust = ...; cust.getItinerary(5).makePayment(); 2. In Cade's book, a component is a class, JSP? But aren't components supposed to be a group of classes? Is that level of detail in Component Diagram enough? 3. In class diagram, do we need to show a User class and Customer and TravelAgent as sub classes? Or Customer is engouh? Other than this I dont see use of Inheritance in class diagram.
1. Yes, you can implement in this way. 2. Yes and No, a component diagram is a simple, high-level diagram that shows the organization of and dependencies among a set of components. Component diagrams address the static implementation view of a system. A component can be a simple class or a group of classes (e.g. an EJB component consists of home/bean/remote/local classes) 3. Yes and No depends on your design. You can put inheritance or realization relationship for your business classes, control class and helper classes.
posted 14 years ago
For 1, in order to make a payment, we could directly use Itinerary object: In PaymentHandler: List its = getItineraries(custid); // custid is always in session Itinerary it = (Itinerary) its.get(it_id); Does it break any relationship between Customer and Itinerary? A Customer and Itineary will still have 1 to many relationship - composition.