Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pricing model

 
sergej bogdanoff
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a bit confused with the pricing model.

To price an itin, you need to list the segments and the seats and query the database to retrieve one price for each segment/seat.

But in the requirements, we you select the flight the first time, it states that you must price the flights without having chosen the seats!

So I assume that there are 2 prices, one for the segment (flat price) and one for the seat (first and economic class.)

Does it make sense for you?

Thanks.
Sergej.
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a simplification over the real world, where prices are based not only on where you're going and what class you want, but when you buy the tickets (someone who walks up to the counter the day of the flight is going to pay much more than someone who reserved at least three weeks in advance, etc). It's so that you don't have to worry about putting something temporal in the equation for calculating the prices.

But you're definitely thinking of it in the right direction.
 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
price=flat price(segment)+seat class price
for every flight just including two classes of seats,so when customer selected the segment system can show him both first class price and coach price.
 
sergej bogdanoff
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for this clarification!
 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you agree the relationship between the flight and the segment is one to one you also can just include two price attributes(first class and coach ) in the flight;the segment no need include the price attributes.
 
sergej bogdanoff
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep,

I always wondered if I should merge into one value object every entities that have a 1 to 1 dependency like Segment/Flight and Flight/Equipment.
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the by, Sergej, not trying to be a pain, but you might want to check out the naming policy at JavaRanch if you're going to be hanging around. (Just trying to be helpful before the sheriffs say something to you.) Your username's not in compliance.
 
sergej bogdanoff
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, Sergej is my first name. I'll add my name if you want.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic