You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
429 B
15 lines
429 B
package patronChainOfResponsibility;
|
|
|
|
public class DirectorPCompra extends PoderDeCompra{
|
|
private final int PERMISIBLE = 20 * base;
|
|
@Override
|
|
public void procesarPeticion(PeticionDeCompra peticion) {
|
|
if( peticion.getImporte() < PERMISIBLE) {
|
|
System.out.println("El director puede aprobar la cantidad de "+ peticion.getImporte()+" euros.");
|
|
}else if(sucesor!= null) {
|
|
sucesor.procesarPeticion(peticion);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|