Click here to Skip to main content
13,798,546 members
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 17:39pm
Updated 14-Jun-17 21:24pm

1 solution

Rate this: bad
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.

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 | Cookies | Terms of Service
Web04 | 2.8.181207.3 | Last Updated 15 Jun 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

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