Question

Java: Write an Applet Application to create a menu for a pizza shop. Use check boxes,...

Java:

Write an Applet Application to create a menu for a pizza shop. Use check boxes, radio buttons, and a JButton to allow a customer to make selections and process their order. Use a text area to display the customer's order and the amount due.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

pizzaShop.html

<html>
<body>

<form style="background:url(images/pizza.jpg); height: 1000px;" method="get" action="singer">
<h1 align="Center"><font color="#20F429" size=18><marquee>Welcome to Pizza Shop</marquee></font></h1><br><br>
<div align="left">
<font face="Times New Roman" size=6 color="#0000FF"><b><u>&nbsp;&nbsp;Give Details</u></b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font size=6 face="Times New Roman" color="#0000FF">&nbsp;<b>&nbsp;</font>
<left>
<pre>
<font size=6 color="#000000">
&nbsp;Size: <input type="radio" name="gen" value="Small">Male<br>
<input type="radio" name="gen" value="Medium">Female<br>

<input type="radio" name="gen" value="Large">Female<br>
&nbsp;City: <input type="text" name="ct"><br>
&nbsp;Genre: <input type="checkbox" name="gn" value="Margherita"> Rock
<input type="checkbox" name="gn" value="Calzone"> Pop
   <input type="checkbox" name="gn" value="Stromboli"> Folk
   <input type="checkbox" name="gn" value="Marinara"> Classical
   <input type="Submit" value="submit">
   <input type="Reset" value="reset">
</font>
</form>
</body>
</html>

pizza.java

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;

public class singer extends HttpServlet
{
   private int pizzaCost;

public void init() {
// Reset hit counter.
pizzaCost= 0;
}
public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
{
res.setContentType("text/html");
PrintWriter pw = res.getWriter();
String gen = req.getParameter("gen");
String gn = req.getParameter("gn");

try{
// WRITE YOUR CODE TO DECIDE PIZZA cost and assign it to variable pizzaCost
   String title = "Your Order is:";

String Cost= "Your Pizaa Cost is :";
   pw.println( "<h1 align = \"center\">" + title + "</h1>\n" +
"<h2 align = \"center\">" + gn+ "</h2>\n"+ "<h2 align = \"center\">" + Cost+ "</h2>\n" + "<h2 align = \"center\">" + pizzaCost+ "</h2>\n");
   con.close();
}
catch(Exception e)
{
pw.println(e);}
}
  
public void destroy() {
// This is optional step but if you like you
  
}
  
  
}

Add a comment
Know the answer?
Add Answer to:
Java: Write an Applet Application to create a menu for a pizza shop. Use check boxes,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a user friendly interface to order a pizza. Use appropriate controls (radio buttons, list boxes,...

    Create a user friendly interface to order a pizza. Use appropriate controls (radio buttons, list boxes, check boxes) to obtain the type of pizza (e.g. small, medium, large) and the toppings. Calculate the cost of the pizza based upon the size, number of toppings and delivery charge. Display a summary of the order in a text area along with the total cost. Provide buttons which places the order and clears the order. Allow for multiple pizzas to orders Submit as...

  • I have to create a Java paint/drawing application. The JFrame app must support the following functions:...

    I have to create a Java paint/drawing application. The JFrame app must support the following functions:  Draw curves, specified by a mouse drag.  Draw filled rectangles or ovals, specified by a mouse drag (don't worry about dynamically drawing the shape during the drag - just draw the final shape indicated).  Shape selection (line, rectangle or oval) selected by a combo box OR menu.  Color selection using radio buttons OR menu.  Line thickness using a combo...

  • Write a Java application or applet program that asks users enter name, university, city, state, and...

    Write a Java application or applet program that asks users enter name, university, city, state, and zip code, and store the information in the text area. The ComboBox for states has the following items: FL, GA, NC, and SC. The output of a sample run of your program is shown in Appendix 2 the department,

  • Doing JFrame and make comments 16; 17, 18 (Marks: 50) Develop a Java Gur application that...

    Doing JFrame and make comments 16; 17, 18 (Marks: 50) Develop a Java Gur application that will produce an Area lookup application that will allow a user to view a phone or postal code for a Town in a particular Country. Do not forget to use allocated the marking guideline at the end of this question to see how the marks are create two combo boxes, one for the country selection and another to select a town. Also, add two...

  • This is about PHP. Create a form that contains a select menu or series of check boxes that allow for multiple sections....

    This is about PHP. Create a form that contains a select menu or series of check boxes that allow for multiple sections. Then, in the handling PHP script, display the selected items along with a count of how many the user selected.

  • You are going to write a java application that will be used in a coffee shop...

    You are going to write a java application that will be used in a coffee shop to take customer orders and print a simple on screen order summary. Your coffee shop only sells one type and one size coffee for $5 dollars. However, your customers have the option of adding whipped cream and chocolate each for $1 dollar. Your application takes in customer name, the number of coffees being ordered and whether or not the customer wants whipped cream and/or...

  • USING JAVA and NOTTT using BufferedReader or BufferedWriter Write an application that implements ...

    USING JAVA and NOTTT using BufferedReader or BufferedWriter Write an application that implements a simple text editor. Use a text field and a button to get the file. Read the entire file as characters and display it in a TextArea. The user will then be able to make changes in the text area. Use a Save button to get the contents of the text area and write that over the text in the original file. Hint: Read each line from...

  • in java plz and not using bufferedreader or bufferedwriter!! Write an application that implements a simple...

    in java plz and not using bufferedreader or bufferedwriter!! Write an application that implements a simple text editor. Use a text field and a button to get the file. Read the entire file as characters and display it in a TextArea. The user will then be able to make changes in the text area. Use a Save button to get the contents of the text area and write that over the text in the original file. Hint: Read each line...

  • 1. Create a Java application that will change the appearance of a string as shown in...

    1. Create a Java application that will change the appearance of a string as shown in the picture. 2. The program will include a panel, label, checkboxes, radio buttons, and list. 3. To change color, set up 4 radio buttons in a button group. The colors are Black, Red, Green, and Blue to be selected. The default color is Black. 4. To change the font size, set up a list. The sizes are 18, 26, 38, and 56 to be...

  • what is the solution for this Java project? Create the an application that can use different...

    what is the solution for this Java project? Create the an application that can use different types of Linked List to manage either Checking Account or Saving Account. The application should allow users can select the type of Linked List to work on. After finishing one, users can select to work with other type of Linked List until they want to exit Singly Linked List Singly Linked List with Iterator Java Linked List with Iterator 1. 2. 3. You can...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT