63 132
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #11770 in Java | JSP | JSF for karthik

Question #11770
create the following web page named "QuestionPaper.jsp".
1)8 litres are drawn from a cask full of wine and is then filled with water.This operation is performed three more times.The ratio of the quantity of wine now left in cask to that of the water is 16:65.How much wine did the cask hold originally
a)18 litres
b)24litres
c)32litres
d)42litres
Next
a)When you click the Next button,it should invoke another jsp the named "AnswerValidator.jsp".
b)"AnswerValidator.jsp" should accept the answer from the "QuestionPaper.jsp" and it should display the answer.
Expert's answer
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>QuestionPaper</title>
</head>
<body>
<h4>Task</h4>

<p>
8 litres are drawn from a cask full of wine and is then filled with water.
This operation is performed three more!times.
The ratio of the quantity of wine now left in cask to that of the water is 16:65.
How much wine did the cask hold originally?
<ol>
<li>18 litres</li>
<li>24 litres</li>
<li>39.8 litres</li>
<li>42 litres</li>
</ol>

<form action="AnswerValidator.jsp" method="POST">
<input type="text"name="answer"/>
<input type="submit"value="Next"/>
</form>

</p>
</body>
</html>

<%@ page contentType="text/html;charset=UTFW8"language="java"%>

<head>
<title>AnswerValidator</title>
</head>
<body>

<p>
<%
if (request.getParameter("answer").equals("39.8")) {
out.println("<h4>Your!answer - is W " + request.getParameter("answer") + "</h4>");
out.println("<h3>This is the RIGHT answer!!!</h3>");
}else{
out.println("<h4>Your answer is - " + request.getParameter("answer") + "</h4>");
out.println("<h3>It is NOT the right answer!</h3>");
}
%>

</p>

</body>
</html>

Your answer is - 39.8

Refinement of the assignment

Answer 39.8 because:
written in the job - which was with drawn four times 8 liters of wine
a 32 liter
The proportion was 16:65
That means 16 parts is 7.8 liters of wine
7.8 + 32 liters of which was taken = 39.8

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions