
import java.io.*;
import java.util.*;
import java.util.Scanner;

class Pizza{
    Fw sizeAndPrice;
    public Pizza(Fw f){
	sizeAndPrice=f;
    }
}
class QuesoPizza extends Pizza{
    public QuesoPizza(Fw f){
	super(f);
    }
}
class PeperoniPizza extends Pizza{
    public PeperoniPizza(Fw f){
	super(f);
    }
}
class CarnivoraPizza extends Pizza{
    public CarnivoraPizza(Fw f){
	super(f);
    }
}
class PortebelloPizza extends Pizza{
    public PortebelloPizza(Fw f){
	super(f);
    }
}

class Orden{
    private int amountOfSodas;
    private int amountOfSalads;
    private int costOfSalad;
    
    public Orden(){
    }
    public void addNewPizza(){
    }
    public void setAmountOfSodas(int amount){
	amountOfSodas=amount;
    }
    public void setAmountOfSalads(int amount){
	amountOfSalads=amount;
    }
	public int costofsodas(int costOfSoda)
	{int totals=0;
		totals=amountOfSodas*costOfSoda;
		return totals;
    
	}
	public int costofsalads(int costOfSalad)
	{int totals2=0;
		totals2=amountOfSalads*costOfSalad;
		return totals2;

	}
}
class Fw{//Flyweight
    public Fw(){}
}
class Iterator{
    
}
class Builder{
    private Orden nuevaOrden;
    
    public Builder(){
	nuevaOrden=new Orden();
    }
       
    public void addPizza(int amount, String type){
	
    }
    
    public void addSodas(int amount){
	nuevaOrden.setAmountOfSodas(amount);
    }
    
    public void addSalads(int amount){
	nuevaOrden.setAmountOfSalads(amount);
    }
    
    public Orden getOrden(){
	return nuevaOrden;
    }
}


public class Pizzeria
{
    public static Vector<Orden> ordenes;
    public static Builder bd;
    public static Orden ord;
    public static void main(String[] args) throws IOException {
		ordenes=new Vector();
		Scanner in=new Scanner(System.in);
		bd=new Builder();
		ord=new Orden();
		int option;
		do
		{
			System.out.print("Bienvenidos a pizzeria Don Chuy\n");
			
			System.out.print("1) Ordenar una pizza\n");
			System.out.print("2) Ordenar una soda\n");
			System.out.print("3) Ordenar una ensalada\n");
			System.out.print("4) Total del pedido\n");
			System.out.print("5) Reporte del dia\n");
			System.out.print("6)Salir\n");
			System.out.print("Seleccione una opción\n");
			option=in.nextInt();
		
			switch(option)
			{
			case 1:
					//pizza();
			break;

			case 2:
				int getnum;
				System.out.println("Cuantas sodas quiere?");
				getnum=in.nextInt();
				bd.addSodas(getnum);
				
			break;
			case 3:
				int getnumsalad;
				System.out.println("Cuantas ensaladas quiere?");
				getnumsalad=in.nextInt();
				bd.addSalads(getnumsalad);
			break;
			case 4:

					int totalsoda;int totalsalad;int totalgeneral=0;
					ordenes.add(bd.getOrden());
				totalsoda=ordenes.lastElement().costofsodas(20);
				System.out.print("Costo de las sodas:  " +ordenes.lastElement().costofsodas(20)+"\n");
					totalsalad=ordenes.lastElement().costofsalads(70);
				System.out.print("Costo de las ensaladas:  " +ordenes.lastElement().costofsalads(70)+"\n");
				
				totalgeneral=totalsoda+totalsalad;
				System.out.print("Total: " +totalgeneral+"\n");
			break;
			
			case 5://reportes
				   java.util.Iterator<Orden> it=ordenes.iterator();
					System.out.println("Obteniendo reportes");
					int cont=0;
					while(it.hasNext())
					{
						cont+=1;
						System.out.print(cont+") "+it.next().costofsodas(20)+"\n");
					   }					
			break;
			}

		  }while(option!=6);
    }
	
    public static Pizza FactoryBuilderPizza(String type, short size){
	Pizza nuevaPizza;
	Fw example=new Fw();
	if(type.equalsIgnoreCase("queso"))
	    nuevaPizza=new QuesoPizza(example);
	else if(type.equalsIgnoreCase("peperoni"))
	    nuevaPizza=new PeperoniPizza(example);
	else if(type.equalsIgnoreCase("carnivora"))
	    nuevaPizza=new CarnivoraPizza(example);
	else if(type.equalsIgnoreCase("portebello"))
	    nuevaPizza=new PortebelloPizza(example);
	else
	    nuevaPizza=null;
	return nuevaPizza;
    }
}


@@ -563,16 +563,44 @@
 Salads;%0A
+%09private int amountOfPizza;%0A
     priv
@@ -840,16 +840,88 @@
 ;%0A    %7D%0A
+%09public void setAmountOfPizza(int amount)%7B%0A%09amountOfPizza=amount;%0A%09   %7D%0A
 %09public 
@@ -1147,16 +1147,137 @@
 s2;%0A%0A%09%7D%0A
+%09public int costofpizza(int costOfPizza)%0A%09%7B%0A%09int totals3=0;%0A%09%09totals3=amountOfPizza*costOfPizza;%0A%09%09return totals3;%0A%09   %7D%0A
 %7D%0Aclass 
@@ -1666,38 +1666,116 @@
 Salads(amount);%0A
-
     %7D%0A
+%09public void addPizza(int amount)%0A%09%7B%0A%09nuevaOrden.setAmountOfPizza(amount);%0A%09%7D%0A
     %0A    public 

Set method for price calc of pizza