Question: Using the following pseudocode, write an HTML doctype code sequence that only uses basic java terminology such as ( variable names, variable declarations, numbers, boolean
Using the following pseudocode, write an HTML doctype code sequence that only uses basic java terminology such as variable names, variable declarations, numbers, boolean values, strings, user inputs, assignment statements, arithmetic, relational, and logical operators, ifelse conditionals, ifelse nested conditionals, math modules:
Start
SET hotelRate
SET transportationRate
SET guideRate
SET premiumGold
SET premiumSilver
SET taxRate
INPUT numDays
INPUT Transportationur
INPUT tourGuide
INPUT premiumPackage
INPUT premiumType
IF numDays THEN
hotelCost numDayshotelRate
ELSE
hotelCost numDayshotelRate
ENDIF
IF Transportation Yes THEN
SET transportCost numDaystransporationRate
ELSE
SET transportCost
ENDIF
IF tourGuide Yes THEN
SET guideCost numDaysguideRate
ELSE
SET guideCost
ENDIF
IF premiumPackage Yes THEN
IF premiumType is "Silver"
SET Discount transportCost guideCost
SET subTotalCost hotelCost guideCost transportCost Discount premiumSilver
ELSE
SET Discount hotelCost premiumGold transportCost guideCost
SET subTotalCost hotelCost premiumGold transportCost guideCost Discount
ELSE
SET subTotalCost hotelCost transportCost guideCost
ENDIF
SET ammountTax subTotalCosttaxRate
SET totalCost subTotalCost ammountTax
DISPLAY "Subtotal Cost: $subTotalCost
DISPLAY "Discount Total: $Discount
DISPLAY "Sales Tax Cost: $ammountTax
DISPLAY "Total Trip Cost: $totalCost
Stop
DO NOT USE document.getelementbyid, document.queryselector, or other similar methods
PROBLEM DESCRIPTION
A GUI Graphical User Interfaceis required to process travel agency services and produce accurate results. Radio buttons and text boxes will be used for input and output purposes. A button will be used for processing data. Another button will be employed to clear the text boxes and radio buttons.
Create a web page to implement the interface required using the JavaScript programming language. The illustration below displays the format of the GUI screen required.
Note: Choose a background color and a text color of your preference.
Travel Agency Program
Inputs
Number of Days:
Transportation Vehicle: Yes O No
Tour Guide: Yes No
Premium Package: Yes O No
Premium Type:
Outputs
Total Price: $
Member Discount: $
Sales Tax: $
Final Cost: $
The original rules about the logic required are listed below:
A travel agency offers a variety of different packages for visiting several regions in Spain. Each package includes accommodations for a certain number of nights at a hotel within the region being visited.
To increase the amount of customers using this agency to travel, the agency has started to offer premium packages that come with extra benefits.
Length of trip:
Hotel accommodations cost $per day
A trip length of or moredays will receive a discount on hotel costs
Transportation and tour guide services:
Rent transportation vehicle $per day
Private tour guide $per day
At the end of the purchase, two levels of premium packages will be offered, Silver or Gold.
Customers can choose either one or noneof the two.
Silver premium packages cost $and provide a discount on transportation and tour guide services
Gold premium packages cost $and provide a discount on all purchases including the package cost
Inputs:
Number of Days: Integer
Transportation Vehicle: Yes or No
Tour Guide: Yes or No
Premium Package: Yes or No
Premium Type: Silver or Gold
Outputs:
Total price pretax
Discount.
Sales Tax amount to be added to the bill rounded to two decimals
Final Cost of the bill including the tax
Processing:
Process button:
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 included in their onclick properties.
It will process the inputs gathered by the text box and radio buttons to perform the appropriate calculations and generate the required results.
The code for the Process button should not include the prompt or alert functions
It will place the required results on the appropriate output boxes.
Example of the syntax for 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
The string textvariables should be set to the em
do not use document.getElementByID or document.querySelector in any way or form, you reference each ID by using value' and no use of functions and declare variables by using var.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
