• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A few questions on Part II

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic