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, if-else conditionals, if-else nested conditionals, math modules):
Start
SET hotelRate =200
SET transportationRate =150
SET guideRate =200
SET premiumGold =200
SET premiumSilver =100
SET taxRate =0.07
INPUT numDays
INPUT Transportationur
INPUT tourGuide
INPUT premiumPackage
INPUT premiumType
IF numDays <7THEN
hotelCost =numDays*hotelRate
ELSE
hotelCost =numDays*hotelRate*0.90
ENDIF
IF Transportation ="Yes" THEN
SET transportCost =numDays*transporationRate
ELSE
SET transportCost =0
ENDIF
IF tourGuide ="Yes" THEN
SET guideCost =numDays*guideRate
ELSE
SET guideCost =0
ENDIF
IF premiumPackage ="Yes" THEN
IF premiumType is "Silver"
SET Discount =0.10*(transportCost +guideCost)
SET subTotalCost =hotelCost +guideCost +transportCost -Discount +premiumSilver
ELSE
SET Discount =(hotelCost +premiumGold +transportCost +guideCost)*0.20
SET subTotalCost =hotelCost +premiumGold +transportCost +guideCost -Discount
ELSE
SET subTotalCost =hotelCost +transportCost +guideCost
ENDIF
SET ammountTax =subTotalCost*taxRate
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 Interface)is 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 $200per day
A trip length of 7(or more)days will receive a 10%discount on hotel costs
Transportation and tour guide services:
Rent transportation vehicle $150per day
Private tour guide $200per day
At the end of the purchase, two levels of premium packages will be offered, Silver or Gold.
Customers can choose either one (or none)of the two.
Silver premium packages cost $100and provide a 10%discount on transportation and tour guide services
Gold premium packages cost $200and provide a 20%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 (pre-tax).
Discount.
Sales Tax amount to be added to the bill (7%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 0
The string (text)variables 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!