Question: Need help with code in c#, please and thank you! In this exercise, you'll add code that calculates the number of nights, total price, and

Need help with code in c#, please and thank you!
Need help with code in c#, please and thank you! In this
exercise, you'll add code that calculates the number of nights, total price,
and average price for a reservation based on the arrival and departure

In this exercise, you'll add code that calculates the number of nights, total price, and average price for a reservation based on the arrival and departure dates the user enters. Open the project and implement the calculations 1. Extract the zip file provided with this homework, and open the Reservations project in the Homework 09\Reservations directory. Then, display the code for the form and notice that some of the methods are commented out so they don't return errors. 2. Add code to get the arrival and departure dates the user enters when the user clicks the Calculate button. Then, calculate the number of days between those dates, calculate the total price based on a price per night of $120, calculate the average price per night, and display the results. 3. Test the application to be sure it works correctly. At this point, the average price will be the same as the nightly price. Enhance the way the form works 4. Add an event handler for the Load event of the form. This event handler should get the current date and three days after the current date and assign these dates to the Arrival Date and Departure Date text boxes as default 4. Add an event handler for the Load event of the form. This event handler should get the current date and three days after the current date and assign these dates to the Arrival Date and Departure Date text boxes as default values. Be sure to format the dates as shown above. 5. Modify the code so Friday and Saturday nights are charged at $150 and other nights are charged at $120. One way to do this is to use a while loop that checks the day for each date of the reservation. 6. Test the application to be sure that the default dates are displayed correctly and that the totals are calculated correctly. Add code to validate the dates 7. Uncomment the IsDateTime method and then add code to check that the arrival and departure dates are valid dates. CIS 160 Homework 9 8. Uncomment the IsWithinRange method and then add code to check that the arrival and departure dates are within a range that includes the minimum and maximum dates that are passed to it. 9. Uncomment the IsValidData method and then add code that uses the IsPresent, IsDateTime, and I IsWithinRanee methods to validate the surival and departure 7. Uncomment the IsDateTime method and then add code to check that the arrival and departure dates are valid dates. CIS 160 Homework 9 8. Uncomment the IsWithinRange method and then add code to check that the arrival and departure dates are within a range that includes the minimum and maximum dates that are passed to it. 9. Uncomment the IsValidData method and then add code that uses the IsPresent, IsDateTime, and IsWithinRange methods to validate the arrival and departure dates. These dates should be in a range from the carrent date to five years after the current date. 10. Add code that uses the IsValidData method to validate the arrival and departure dates. In addition, add code to check that the departure date is after the arrival date. 11. Test the application to be sure the dates are validated properiy. In this exercise, you'll add code that calculates the number of nights, total price, and average price for a reservation based on the arrival and departure dates the user enters. Open the project and implement the calculations 1. Extract the zip file provided with this homework, and open the Reservations project in the Homework 09\Reservations directory. Then, display the code for the form and notice that some of the methods are commented out so they don't return errors. 2. Add code to get the arrival and departure dates the user enters when the user clicks the Calculate button. Then, calculate the number of days between those dates, calculate the total price based on a price per night of $120, calculate the average price per night, and display the results. 3. Test the application to be sure it works correctly. At this point, the average price will be the same as the nightly price. Enhance the way the form works 4. Add an event handler for the Load event of the form. This event handler should get the current date and three days after the current date and assign these dates to the Arrival Date and Departure Date text boxes as default 4. Add an event handler for the Load event of the form. This event handler should get the current date and three days after the current date and assign these dates to the Arrival Date and Departure Date text boxes as default values. Be sure to format the dates as shown above. 5. Modify the code so Friday and Saturday nights are charged at $150 and other nights are charged at $120. One way to do this is to use a while loop that checks the day for each date of the reservation. 6. Test the application to be sure that the default dates are displayed correctly and that the totals are calculated correctly. Add code to validate the dates 7. Uncomment the IsDateTime method and then add code to check that the arrival and departure dates are valid dates. CIS 160 Homework 9 8. Uncomment the IsWithinRange method and then add code to check that the arrival and departure dates are within a range that includes the minimum and maximum dates that are passed to it. 9. Uncomment the IsValidData method and then add code that uses the IsPresent, IsDateTime, and I IsWithinRanee methods to validate the surival and departure 7. Uncomment the IsDateTime method and then add code to check that the arrival and departure dates are valid dates. CIS 160 Homework 9 8. Uncomment the IsWithinRange method and then add code to check that the arrival and departure dates are within a range that includes the minimum and maximum dates that are passed to it. 9. Uncomment the IsValidData method and then add code that uses the IsPresent, IsDateTime, and IsWithinRange methods to validate the arrival and departure dates. These dates should be in a range from the carrent date to five years after the current date. 10. Add code that uses the IsValidData method to validate the arrival and departure dates. In addition, add code to check that the departure date is after the arrival date. 11. Test the application to be sure the dates are validated properiy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!