• 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Segmentfare class ?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone throw some pointers to this.

Shoud we create a seperate SegmentFare class which will have
a direct association with Flight class[as it may vary depends on
the time of the flight] or should we assume that it is a part of Seat
domain object ?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think the fare is directly related to the flight. Rather, it depends on the type of seat.
 
Gopal Chiluki
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does this mean it is fair to have an association between SegmentFare class and Seat ?
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Gopal Chiluki:
does this mean it is fair to have an association between SegmentFare class and Seat ?



Gopal,
I see Seat Fare as an attribute of Seat. For this business domain, Fare is an atomic literal and there is no behavior associated with that. So, I wouldn't make that a class.

Solomon
 
Gopal Chiluki
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that makes sense.. Thanks for clarifying it
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think the fare is directly related to the flight. Rather, it depends on the type of seat.

Besides the type of seat, flight also affect air fare (I think). For a coach seat, fares to travel from Los Angeles to Las vegas and Lost Angeles to San Francisco for the same aircraft are different. Am I wrong?
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Vu, the price of a segment we can put with the type of seat side. I also think we can make a CMR composite entity for a flight.
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!