In this exercise, you modify the Treeline Resort application from this lesson. Use Windows to make a

Question:

In this exercise, you modify the Treeline Resort application from this lesson. Use Windows to make a copy of the Treeline Solution folder. Rename the copy Modified Treeline Solution. Open the Treeline Solution (Treeline Solution.sln) file contained in the Modified Treeline Solution folder.

a. Currently, the application calculates the total parking fee by multiplying the daily parking fee by the number of nights. However, this calculation is based on the assumption that the guest will have only one vehicle to park, when it is entirely possible that he or she (or other members of the guest’s party) may have two or more vehicles. Add a label control and a text box to the form, positioning both below the check box. Change the label’s Text property to N&umber of vehicles: (including the colon). The user will enter the number of vehicles in this new text box. When the user selects the check box, display the number 1 in the text box. When the user deselects the check box, clear the contents of the text box. (Hint: A check box also has a Click event.)

b. Modify the code so it now calculates the total parking fee by multiplying the daily parking fee by the number of nights, and then multiplying that result by the number of vehicles. As is currently done, the parking fee should be charged only when the check box is selected. Clear the calculated amounts when a change is made to the number of vehicles. Make the appropriate modifications to the code. Test the application appropriately.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: