Pizza Order CODE::
import javax.swing.JOptionPane;
public class PizzaOrder
{
public void Takecustomerorder()
{
String Pizzatype = JOptionPane.showInputDialog ("What kind of pizza");
String Pizzanumstr = JOptionPane.showInputDialog("How many Pizza");
String toppings = JOptionPane.showInputDialog ("How many toppings");
String price = JOptionPane.showInputDialog ("How much");
PizzaReceipt AR = new PizzaReceipt();
AR.writeHeader();
AR.writeDetailLine();
AR.writeTotalLine();
Pizza Receipt CODE:
public class PizzaReceipt
{
public void writeHeader()
{
System.out.println ("Bambino's Pizza - Branch Manager Farid Hernandez");
}
public void writeDetailLine (String Pizzatype; Double price; String toppings; int Pizzanumstr);
{
System.out.println ("pizza" + Pizzatype + "number" + numOfPizza + "@" + price + "="
+ price * numOfPizza);
System.out.println ( "Extratopping" + toppings.length( )+ "@ .50 =" + toppings.length);
}
public void writeTotalLine() {
// TODO Auto-generated method stub
{
System.out.println ("Subtotalamount" + "tax" + "@" + "8%" + "Finalcost");
Attached File(s)
-
Program_2_defined.doc (32K)
Number of downloads: 236

New Topic/Question
Reply




MultiQuote





|