Your solutions to the following problems should use helper functions in place of repeated code. You may also introduce helper functions to improve the readability of your code.
registration-rate
which consumes a registration category and returns the registration fee for that category. Fees are given in the following table:
regular $400 member $350 student $150
hotel-surcharge
which consumes hotel information and produces the total charge for that hotel request (for all nights). One night starts at $109 for a double and $89 for a king at a 2-star hotel. Rates go up $30 per night for each room type for each additional star (so a 4-star king room should cost $149 a night). Compute the charges based on the formula given, rather than by explicitly coding in the rates for each room-type and star combination.
fees-due
which consumes a conference registrant structure and produces the total fees due for the registration. The total fees should include the registration fee, hotel surcharge, and $40 if the person plans to attend the banquet.
upgrade-hotel
, which consumes a conference registration (not a hotel info) and a number (new number of hotel stars) and returns a conference registration. If the given number is larger than the number of hotel stars currently requested, the produced registration has the new number of hotel stars (and all other information the same). Otherwise, all of the information in the produced registration should be the same as in the given registration.
Using web-based turnin, turn in a single file containing all code and documentation for this assignment. Follow the naming conventions for homework files. In addition, BOTH partners' names and wpi ccc usernames MUST be listed in a comment at the top of your file. Programs will not be accepted for submission after 5pm on Tuesday, Sept 6.