



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Step 1: The XHTMI. code for inputting the values is
Order Fomm
Items:
Four 100 Watt light bulbs for Rs.20
cinput type="checkbox" name="option2">Eight 100 Watt light bulbs for Rs.40 td>
Four
100 Watt long life light bulbs for Rs.30 td>
Eight 100 Watt long life light bulbs for Rs.70 tr> td>
Str> td>Payment: /tr> tr> td> Visa
String str2=req.getParameter('val2"); Item2 =Integer.parselnt(str2); } ireq.getParameter('option3")| =null) {String str3=reqgetParameter("'val3"); Item3 =Integer.parselnt(str3); ifreq getParameter("'option4")| =null) String str4=req.getParameter('val4"); Item4=Integer.parselnt(str4); int total1=Item1 price1; int total2=Item2 price2; int total3=Item3 price3; int total4=Item4"price4; double total=(total1+total2+total3 +total4) total+=(total 2.0)/100; out.println""); out.printin(""); out.println("); out.printin(""): out.println("); out.println (User Name: "+UName); out.println ("You have ordered following items "); out.println("); outprintln('"); out printinl"Qty. "; out.println("Price"); out.println("Total"); out.println""); out.println(""); out.println(""+Item1+"";
out.printn(""+ price1+""); out.println(""+total1+""); out.println""); outprintn(""); out.println(""+Item2+""); out.println(""+price2+""); out.println(""+total2+""); out.println(""); out.println""); printn('"+Item3+""); out.println(""+price3+""); out.println(""+total3+""); out.println(""); out.println("") out.println(""+Item4+""); out.printn(""+price4+""); out.println(""+total4+""); out.println(""); out.println(" "); out.println("Total Bil(including Sales Tax of 2.0%) : "+total+" "); out.printn('"): out.printlin(""); } }