Example #1
0
  public void MostrarServicio() {
    Plato Plato;
    Bebida Bebida;

    for (int i = 0; i < Platos.size(); i++) {
      Plato = (Plato) Platos.get(i);

      System.out.print(Plato.GetDescripcion() + " ");
    }

    for (int i = 0; i < Bebidas.size(); i++) {
      Bebida = (Bebida) Bebidas.get(i);

      System.out.print(Bebida.GetDescripcion() + " ");
    }
  }
Example #2
0
  public int CalcularTotal() {
    int Total = 0;
    Plato Plato;
    Bebida Bebida;

    for (int i = 0; i < Platos.size(); i++) {
      Plato = (Plato) Platos.get(i);

      Total += Plato.GetPrecio();
    }

    for (int i = 0; i < Bebidas.size(); i++) {
      Bebida = (Bebida) Bebidas.get(i);

      Total += Bebida.GetPrecio();
    }

    return Total;
  }
Example #3
0
 public Bebida(String nombre, String gas) {
   super(nombre);
   this.gas = gas;
   Bebida.setNumBebidas(Bebida.getNumBebidas() + 1);
 }