Advertisement
techno-

Payment.java

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