Fee per person based on number of people.
1-4 $100 per
5-10 $80 per
11 <= $60 per
Just wondering if there is a more efficient way to do this. Would it be better to put the 'cout << "Invalid number of people";' in the if statement? Or leaving it in the switch statement good practice?
caseRates maps caseNum to the appropriate caseRate. (1->100, 2->80, 3->60)
Because caseRates hold maximum 3 values, index 0,1,2, so if you want to use caseRates[caseNum - 1], first you have to check if (caseNum-1) is in range [0,2], which means caseNum is in range [1,3].