The following excerpt from a JSP is meant to display the following output:
The price without tax is: 100.0
The tax rate is: 0.15
The tax on your purchase is: 15.0
The total cost is: 115.0
Using only the line numbers outlined in the JSP excerpt, identify the three lines that need to be
changed to allow for proper translation\compilation\display of the JSP. (Select three answers.)
The JSP excerpt with the errors is:
<html>
<body>
1 <%! public double calculateTax(double price)
{return price * taxRate;}%>
2 <% double taxRate = 0.15;%>
3 <% public double calculateTotal(double price, double tax)
{return price + tax;}%>
4 <% double price = 100.00; %>
5 The price without tax is: <%= price %> <br>
6 The tax rate is: <%= taxRate %> <br>
7 The tax on your purchase is: <% calculateTax(price); %> <br>
The total cost is: <%= calculateTotal(price, calculateTax(price))%> <br>
</body>
</html>
A.
Line 3
B.
Line 5
C.
Line 1
D.
Line 2
E.
Line 4
F.
Line 6
G.
Line 7