Click here to Skip to main content
13,199,852 members (65,226 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I am making a Hotel Check In Form in C++ , whick ask the user to insert No. of Guests ..and I have a condition i.e. Max 6 guests per room. So, if the user enter more than 6 guests the No. of Room changes to 2. Or more than 12 guests the No. of room change to 3.

What I have tried:

I am not able to get the logic.
Posted 14-Jun-17 16:39pm
Updated 14-Jun-17 20:24pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Max 6 guests per room is your business rule but not necessary what the guests want, they may prefer to book more rooms for more space even they are fewer than six. Review your design. Start by asking for number of rooms -> then number of guests (may consider age) for each room (control the range of numbers allowable from 0 to 6) etc. Check out some of the hotel booking sites for clues.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.171020.1 | Last Updated 15 Jun 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100