Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write the program based on this design). High Adventure Travel Agency The High A

ID: 3537502 • Letter: W

Question

write the program based on this design).

High Adventure Travel Agency

The High Adventure Travel Agency offers four vacation packages for thrill-seeking customers. The rates and options vary for each package. You%u2019ve been asked to write a program to calculate and itemize the charges for each package.

Devil%u2019s Courthouse Adventure Weekend: An action-packed three-day weekend spent camping, rock climbing, and rapelling at Devil%u2019s Courthouse, North Carolina. This getaway is for novices and experts alike. Optional climbing instruction is available to beginners at a low price. Camping

equipment rental is also available.

Rates:

Base Charge: $350 per person

Climbing Instruction: $100 per person

Equipment Rental: $40/day per person

Scuba Bahama: A week-long cruise to the Bahamas with three days of scuba diving. Those with prior experience may dive right in, while beginners should choose to take optional, but very affordable lessons.

Rates:

Base Charge: $1,000 per person

Scuba Instruction: $100 per person

Sky-Dive Colorado: Four thrilling days with expert sky-diving instructors in Colorado Springs, Colorado. For lodging, you may choose either the Wilderness Lodge or the Luxury Inn. (Instruction is included for all members of the party.)

Rates:

Base Charge: $400 per person

Lodging at Wilderness Lodge: $65/day per person

Lodging at Luxury Inn: $120/day per person

Barron Cliff Spelunk: Eight days spent hiking and exploring caves in the Barron Cliff Wilderness Area, Tennessee. Camping equipment rental is available.

Rates:

Base Charge: $700 per person

Equipment Rental: $40/day per person

Note: A 10 percent discount on the base charges of any package is given for a party of five or more.

Variables

Constant Variables Used in the High Adventure Travel Agency Program

Variable Description

climbRate = 350.0 A float. Holds base rate of Devil%u2019s Courthouse Adventure Weekend package.

scubaRate = 1000.0 A float. Holds base rate of Scuba Bahamas package.

skyDiveRate = 400.0 A float. Holds base rate of Sky-Dive Colorado package.

caveRate = 700.0 A float. Holds base rate of Barron Cliff Spelunk package.

climbInstruct = 100.0 A float. Holds charge for rock climbing instruction.

scubaInstruct = 100.0 A float. Holds charge for scuba instruction.

dailyCampRental = 40.0 A float. Holds daily charge, per person, for camping equipment rental.

dayLodge1 = 65.0 A float. Holds daily cost of lodging option 1 of Sky-Dive Colorado package. (Wilderness Lodge.)

dayLodge2 = 120.0 A float. Holds daily cost of lodging option 2 of Sky-Dive Colorado package. (Luxury Inn.) 2 Main menu climbing scuba skyDive spelunk Module A Module B Modde D MOdule E Module C

Functions Used in the High Adventure Travel Agency Program

Function name Description

main Calls the menu function and dispatches program control to the appropriate module, based on the user%u2019s choice of packages.

menu Displays a menu listing the vacation packages. Allows the user to enter a selection, which is returned to the main function.

climbing Asks the user for data necessary to calculate charges for the Devil%u2019s Courthouse Adventure Weekend package.

scuba Asks the user for data necessary to calculate charges for the Scuba Bahamas package.

skyDive Asks the user for data necessary to calculate charges for the Sky-Dive Colorado package.

spelunk Asks the user for data necessary to calculate charges for the Barron Cliff Spelunk package.

Program Design

In modular programs, hierarchy charts are used to show the relationship between modules. For example, assume an application has five modules:

Module A, Module B, Module C, Module D, and Module E, with the following relationship between the modules

Module A calls Module B and Module C.

Module B calls Module D and Module E.

These relationships are shown in the hierarchy chart above. Notice that the hierarchy chart does not reveal details about the algorithm or specify when the modules are to be called. Instead, it reveals the relationship between the modules.

Next figure shows a module hierarchy chart for the High Adventure Travel Agency program. The menu that is displayed should list the four vacation packages, plus a fifth option that exits the program. When the user chooses one of the vacation packages, a function is called that asks questions, such as how many people will be going on the trip, and calculates the charges for that particular package. This process repeats until the user chooses to exit the program.

4 General Pseudocode for Each Program Module

Main Module

Call Menu Module

Do-While user does not enter 5

Switch (based on user input)

Case 1: Call Climbing Module

Case 2: Call Scuba Module

Case 3: Call SkyDive Module

Case 4: Call Spelunk Module

End Switch

End Do-While

End of Main Module 3

Climbing Module:

Input number in party needing instruction

Input number of advanced climbers in party

Input number in party renting equipment

Calculate base charges

Calculate discount

Calculate cost of instruction

Calculate cost of equipment rental

Calculate total charges

Calculate minimum required deposit

Display results

End of Climbing Module

Scuba Module:

Input number in party needing instruction

Input number of advanced scuba divers in party

Calculate base charges

Calculate discount

Calculate cost of instruction

Calculate total charges

Calculate minimum required deposit

Display results

End of Scuba Module

SkyDive Module:

Input number in party

Calculate base charges

Calculate discount

Input number in party staying at Wilderness Lodge

Input number in party staying at Luxury Inn

Calculate lodging charges

Calculate total charges

Calculate minimum required deposit

Display results

End of SkyDive Module

Spelunk Module:

Input number in party

Input number in party renting equipment

Calculate base charges

Calculate discount

Calculate cost of equipment rental

Calculate total charges

Calculate minimum required deposit

Display results

End of Spelunk Module

The Program

The next step would normally be to expand the general pseudocode into detailed pseudocode that includes all the program logic and calculations needed to compute the components of an invoice. We have omitted this step from the case study. The final step is to translate the pseudocode into program source code so the program can be run and tested.

Explanation / Answer

ftp://ftp.awl.com/cseng/authors/gaddis/CCSO6/Case_Studies/CS_HighAdventure1.pdf


check this link .I am sure it willh help you a lot.Post comment in case of any doubt.