Beartooth Hiking Company liked your initial design, but has a couple of requests. Is it possible to make sure the number of the people in the party is at least 1, but no more than 10? Also, theyd like to validate the date input somehow (Your choice, you can just verify the fields from the last homework, or if you get brave, you could incorporate a JavaScript Date Picker object (see here, here or here for an example, but you can use your own if you want). In addition, they want to make sure that if you havent done so already, you should use JavaScript to ensure that only correct durations are offerred for each hike. They also want to make sure that the site doesnt do anything like presenting an incorrect date to the user (like June 31st), so if you dont use a Date Picker, use JavaScript to adjust the available dates for a month.(If you think about it, you dont need to use JavaScript for the number in the party, there is a better way than validating raw text input). Remember, you need to use JavaScript in the project, and it needs to be used to validate or create input before it is sent to the server.Youll want to put most of your JavaScript in their own files, otherwise youll have to write out the code from within the Servlet.
test case inputs:
- Gardiner Lake, 3 Days starting on 8/1/2021
- Gardiner Lake, 7 Days starting on 8/1/2021
- Beaten Path, 5 days starting on 10/1/2022
- Hellroaring Plateau, 7 days starting on 07/1/2031
- Hellroaring Plateau, 3 Days, starting on 10/t/2022 – note that this is bad date input
- Gardiner Lake, X Days (bad input) starting on 8/15/2023 bad input
- Beaten Path, 5 days starting on 8/1/2041 should not work as valid years up to 2040
- Gardiner Lake, 3 Days starting on 7/1/2021 even though helper classes will allow you should not allow bookings in the past
Reviews
There are no reviews yet.