Advertisement
techno-

Cancelled.java

Nov 22nd, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.84 KB | None | 0 0
  1. public class Cancelled implements EstadoOrder{
  2.  
  3.     private static final Cancelled instancia = new Cancelled();
  4.     private Cancelled(){}
  5.     public static Cancelled getInstancia(){ return instancia; }
  6.  
  7.     @Override
  8.     public void anadirProducto(Order order, Product producto) {
  9.  
  10.     }
  11.  
  12.     @Override
  13.     public void eliminarProducto(Order order, Product producto) {
  14.  
  15.     }
  16.  
  17.     @Override
  18.     public void siguienteEstado(Order order) {
  19.         order.setEstado(Completed.getInstancia());
  20.     }
  21.  
  22.     @Override
  23.     public void anteriorEstado(Order order) {
  24.  
  25.     }
  26.  
  27.     @Override
  28.     public void modificarCantidadProducto(Order order, Product producto) {
  29.  
  30.     }
  31.  
  32.     @Override
  33.     public void pagar(Order order) {
  34.  
  35.     }
  36.  
  37.     @Override
  38.     public void cancelar(Order order) {
  39.         order.setConfirmado(false);
  40.     }
  41. }
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement