Java Assignment 9 - A Pizzeria

Feb 3rd, 2012
Studypool Tutor
Price: $15 USD

Tutor description

PizzaOrder Class Create a class called PizzaOrder that has the following members: toppingsOffered[] - a constant array of Strings representing the choice of low-price toppings, e.g., { "onions", "bell peppers", "olives", "pepperoni"... }. This member is public and is a static class member. toppingsBaseCost - a constant double representing the cost of budget topping on a small pizza. This member is public and is astatic class member. basePrice - a constant double representing the cost of a small plain pizza. This member is public and is a static class member. size - an int 0 (small), 1 (medium) and 2 (large). This is a private instance member. toppings[] - an array of Strings representing the toppings in this individual order. This is a private instance member. numToppings - an int whose value at any point in time is the number of toppings that have been added to this PizzaOrderobject so far. It would start at 0 when the object is

Word Count: 364
Showing Page: 1/3
import java.util.Arrays;import java.util.Scanner;/** * Created by e7006722 on 16/07/2014. */public class Foothill { public static void main(String args[]) { Scanner console = new Scanner(System.in); String choice = null; int size = -1; while(true) { System.out.print("Size of pizza (small, medium, large) or quit: "); choice = console.next(); if(choice.startsWith("q") || choice.startsWith("Q")) break; PizzaOrder pizzaOrder = new PizzaOrder(); if(choice.startsWith("s") || choice.startsWith("S")) pizzaOrder.setSize(0); else if(choice.startsWith("m") || choice.startsWith("M")) pizzaOrder.setSize(1); else if(choice.startsWith("l") || choice.startsWith("L")) pizzaOrder.

Review from student

Studypool Student
" Thank you, Thank you, for top quality work, this is your guy!! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1829 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors