CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ | Grades | Students

Lab #15 (Exercise 16-2)

Create a Pizza Calculator application

Due Date: Wednesday of Week 5
20 points

In this lab, you'll devlop an application that calculates the price of a pizza based on its size and toppings. the user interface for this application should look something like this:

  1. Decide what layout manager or combination of layout managers you want to use to implement the user interface, and then sketch the user interface and its rows and columns.

  2. Open the PizzaOrderApp.java file. This file contains a public PizzaOrderApp class with an empty main method.
  3. Add the code necessary to implement this application. When the user selects a size and toppings for the pizza and clicks the Calculate button, the application should calculate the price of the pizza and display that prize in the text field. To calculate the price of the pizza, add the price of the selected toppings to the base price of the pizza:

  4. ItemPrice
    Small pizza$6.99
    Medium pizza$8.99
    Large pizza$10.99
    Sausage$1.49
    Pepperoni$1.49
    Salami$1.49
    Olives$0.99
    Mushrooms$0.99
    Anchovies$0.99

  5. Compile the program and test it to be sure it works correctly.

Include in your program the following comments:
  • Name of program
  • Team's name with all the names of the members (e.g. Team A: John Doe, Jane Smith, etc.)
  • Current Date
  • Computer system and compiler you are using
  • Brief description of the program

Compile and run the Java program.

Take a screen capture by hitting simultaneously the keys Alt and Print Screen (Prt Sc) of the output results (console) and paste it in MS Paint. Save it as a gif file.

When you are ready, upload the java program and the gif file by clicking the link below:

Upload Lab

I cannot grade if I don't get the files and receive your email.