Let's say that I have a list of hostels, each of which has a certain number of beds in each room.

The user specifies that there will be 5 guests: 3 adults and 2 children - what exactly should the system give him:

  • any options where the number is more or equal to the number of guests?
  • or is equal to the number of guests?

Some of what you do should probably be governed by the "marketplace" you are in... for example, a party with a total of 3 adults and 2 children might "naturally split" as:

  • (2 adults) + (1 adult, 2 children)
  • (1 adult) + (2 adults, 2 children)
  • (1 adult, 1 child) + (2 adults, 1 child)

among others.

If your main client-base is likely to want rooms based on predetermined splits, and wouldn't be happy "mixing everyone up", then you may be better asking for this information up front. You can then offer rooms that more closely fit their "family units".

If your client-base is likely to be more relaxed about arrangements, then you can simply go with total numbers and leave the choice of who goes where (assuming there ins't a single room large enough) to them.

In this case, it would seem sensible to first list any rooms that are large enough on their own to fulfil the guests' requirements, probably followed by your remaining rooms in order of decreasing size.

If you're being really clever, you could show pairs/sets of rooms that together match or exceed the total party size (using the above example, two "double + single child" rooms would be suitable, albeit with one spare adult place).

Only showing rooms/sets-of-rooms that exactly match the total party size is almost certainly wrong: in many cases, you won't be able to offer such a combination without there being some spare capacity. You should, though, show the actual capacity of rooms on offer, especially if this affects the overall cost. Someone on a budget might shuffle the party to exactly match available rooms; others will be happier to keep people in their "natural groups" even if it means paying a little more.

| improve this answer | |
  • Oh! I really appreciate it. Thank you, you really helped me! P.S. I'll give +1 when I'll have an opportunity – Arsen Saruhanyan Mar 22 '18 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.