Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A few questions on Part II

 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Harvey
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic