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.
16 lines
442 B
16 lines
442 B
3 years ago
|
package patronChainOfResponsibility;
|
||
|
|
||
|
public class VicePresidentePCompra extends PoderDeCompra{
|
||
|
|
||
|
private final int PERMISIBLE = 40 * base;
|
||
|
@Override
|
||
|
public void procesarPeticion(PeticionDeCompra peticion) {
|
||
|
if( peticion.getImporte() < PERMISIBLE) {
|
||
|
System.out.println("El vicepresidente puede aprobar la cantidad de "+ peticion.getImporte()+" euros.");
|
||
|
}else if(sucesor!= null) {
|
||
|
sucesor.procesarPeticion(peticion);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|