Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tp1e10_Clases;
- public class EmpleadoBancario extends Persona{
- private int Id_Empleado;
- private float Sueldo;
- private String Area;
- private String Puesto;
- private String Antiguedad;
- public EmpleadoBancario() {
- }
- public EmpleadoBancario(String v_nombre, String v_puesto, String v_area) {
- if(v_nombre!="" && v_puesto!= "" && v_area !="") {
- this.Nombre = v_nombre;
- this.Puesto = v_puesto;
- this.Area = v_area;
- }else {
- System.out.println ("Valores no admisibles");
- this.Nombre = "Anonimo";
- this.Puesto = "No registrado";
- this.Area = "No empleado";
- }
- }
- public String getNombre() {return this.Nombre;}
- public String getPuesto() {return this.Puesto;}
- public String getArea() {return this.Area;}
- public void getAsesorar() {
- if (this.Area == "Recepcion") {
- System.out.println ("Puede recibir asesoramiento de este empleado");
- }else {
- System.out.println ("Este empleado no puede asesorar. Buscar personal de recepcion");
- }
- }
- }
Add Comment
Please, Sign In to add comment