Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

D PROBLEM DESCRIPTION The World Travel company wishes to modernize the program created to calculate the total price of a tour travel. A GUI (Graphical

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
D PROBLEM DESCRIPTION The World Travel company wishes to modernize the program created to calculate the total price of a tour travel. A GUI (Graphical User Interface) is now required. Radio buttons and text boxes are needed for input and output purposes. Buttons will be used for processing data. You are required to create a webpage to implement the interface required using the JavaScript programming language. The illustration below displays the GUI screen required. World Travel Price Processing Select Destination: Europe Africa Select Air Travel option: One Way Enter number of Hotel nights: Round Trip Grand Basic Select Tour type: Process Total Price: $ his Final Price (includes 15% surcharge): $ Clear . . As a reminder, the pricing list is listed below: Destination: o Europe Air Travel: One Way: $500 Round Trip: $900 Hotel: $300 per night Tour: Grand package: $1,500 Basic package::$800 Africa Air Travel: One Way: $ 700 Round Trip: $1,300 Hotel: $200 per night Tour: Grand package: $1,300 Basic package::$500 Inputs needed (refer to the illustration on the previous page): Continent: Europe or Africa. Air Travel: One Way or Round Trip. Hotel: Number of nights. Tour: Grand or Basic. . Outputs to be displayed (refer to the illustration on the previous page): Total Price The total price calculated prior to the addition of a 15% surcharge. Final price o Note: add 15% to the total price to calculate the final price. . . Processing: Process button: o It will read the content of the Hotel Nights text box. . Example of reading from text box: myVariable - myTextBoxID.value; It loads the content of the text box whose ID is myTextBoxID into the variable myVariable. Notice that the Process button does not need to "read" the radio buttons since the radio buttons take care of loading the appropriate value to the variables involved. o It will process the data from the Hotel Nights text box as well as the data from the radio buttons and generate the totals required. The part of the code for the Process button is very similar to the code for the previous assignment. It should not include the prompt or alert functions o It will also place the results for the totals on the appropriate output boxes. - Example of writing to a text box: myTextBoxID.value = myVariable; It writes the content of the variable myVariable to the text box whose ID is myTextBoxID. Clear button: It will reset all variables The numeric variables should be set 0 . The string (text) variables should be set to the empty string. All the text boxes should be loaded (written to) with the empty string to clear them of any content . It will also clear all the radio buttons (see examples on the last page). SAMPLE TRACES THROUGH THE CORRECT ALGORITHM Sample 1 Sample 2 Inputs: Destination Air Travel Hotel nights Tour Output: Total Price Final Price (includes 15% surcharge) Europe One Way 7 Grand Africa Round Trip 5 Basic $4100.00 $4715.00 $2800.00 $3220.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

Students also viewed these Databases questions