Question: 0) Write a declaration for a C++ structured-record type named Hotel that includes as fields: a double-precision floating-point number named rating and a Boolean value
0) Write a declaration for a C++ structured-record type named Hotel that includes as fields: a double-precision floating-point number named rating and a Boolean value named has_pool. (ii) Use the structured record from the previous question and the given prototype to write a function that determines which hotel is better. The function should return the hotel that is considered better. One hotel is considered better than another: (1) if one hotel has a pool and the other one does not; (2) otherwise, if one hotel has a higher rating than the other hotel In case of a tie, the function should return h1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
