Question
The following information is from the chapter 4 programming project and is given for quick reference purposes: The university traveling club has asked you to
The following information is from the chapter 4 programming project and is given for quick reference purposes: The university traveling club has asked you to develop a program that will help people located and register for regional trips. The following is a list of available destination cities they will use to pilot the program:
Ashville, NC ($149 per night per person; double occupancy)
Atlanta, GA ($99 per night per person; double occupancy)
Highlands, NC ($249 per night per person; double occupancy)
Orlando, FL ($99 per night per person; double occupancy)
Destin, FL ($129 per night per person; double occupancy)
As input, the user will need to provide their name (Last, First), the date they wish to depart, and the date they wish to return. These inputs will be collected via tenboxes.
They will use an input listbox to select the city they wish to visit (shown above).
They will also need to select if they want Double or Single occupancy (radio buttons) along with which excursions they would like to participate in. These are optional (checkboxes) and include:
Hiking - $20 per person
- Apple Picking - $25 per person
Elk Watching - $45 per person
- Massage - $100 per person
- Ballgame - $50 per person
- Concert - $25 per person
Note: Due to the fact that excursion prices change frequently, these values should be entered as Class Level Constants. The program will have three (3) button click events:
- Calculate Estimated Cost
Clear Form
Exit
When Calculating Estimated Cost, the program must validate the input checking for the following:
- Name must not be blank.
- Name must contain a comma.
Departure Date is not blank.
Return Date is not blank.
- Destination city must be selected.
Occupancy must be selected.
Once all input data has been found to be valid, the program should generate the estimated cost of the trip for the individual user. This calculation should take into account:
Cost for the city that is being visited.
Number of nights the trip will last.
Occupancy (Double rates as shown; Singles pay 1.75 double rate)
- A trip registration fee of $50 will be added to each order.
Cost of all select Excursions.
Tax at a 10% rate will also be added.
An inquiry ID should also be generated for each request. This will include the FirstInitial & LastName & huptiry number (a number that is set to 500 for the first person who runs the program and increase by 5 for each inquiry run thereafter). The program must contain the following eleven (11) modules:
DataOK function To insure input data is valid ( ',ce note above for what needs to be checked).
Getlnput Sub Read input values into variables.
InquirylD function Generates and returns the inquiry number.
LengthOfTrip function Returns the number of days the trip will last.
RoomCost function Returns the cost of the room for the number of nights it will be needed.
Price shown above are for double occupancy.
Single occupancy option pays 1.75 of double occupancy price.
DisplayRoomCost Sub Displays the first 7 lines of output (as shown on sample output below). This does include the 2 blank lines within the count of 7.
HandleExcursions Sub Determines the cost of all selected excursions and adds them to the listbox.
"Selected Excursions" and the word "None" should be displayed if no excursions were selected.
SubTotal function Returns cost of room plus excursions plus $50 registration fee.
Tax function Returns the amount of tax.
TotalCost function Returns the final estimated cost (subtotal plus tax).
DisplayTotals Sub Displays the final 3 lines of output
Programming Notes:
All outputs should be formatted appropriately.
All inputs must be read into variables and processed using the variable names. Excursion costs must be entered as class level Constant values.
Appropriate scope for variables should be used.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started