This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

A few questions on Part II  RSS feed

 
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.
 
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!