Luca_G6

EmpleadoBancario.java

Mar 27th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1. package tp1e10_Clases;
  2.  
  3. public class EmpleadoBancario extends Persona{
  4.  
  5.     private int Id_Empleado;
  6.     private float Sueldo;
  7.     private String Area;
  8.     private String Puesto;
  9.     private String Antiguedad;
  10.    
  11.     public EmpleadoBancario() {
  12.     }
  13.    
  14.     public EmpleadoBancario(String v_nombre, String v_puesto, String v_area) {
  15.         if(v_nombre!="" && v_puesto!= "" && v_area !="") {
  16.             this.Nombre = v_nombre;
  17.             this.Puesto = v_puesto;
  18.             this.Area = v_area;
  19.         }else {
  20.             System.out.println ("Valores no admisibles");
  21.             this.Nombre = "Anonimo";
  22.             this.Puesto = "No registrado";
  23.             this.Area = "No empleado";
  24.         }
  25.     }
  26.    
  27.     public String getNombre() {return this.Nombre;}
  28.    
  29.     public String getPuesto() {return this.Puesto;}
  30.    
  31.     public String getArea() {return this.Area;}
  32.    
  33.     public void getAsesorar() {
  34.         if (this.Area == "Recepcion") {
  35.          System.out.println ("Puede recibir asesoramiento de este empleado");
  36.         }else {
  37.             System.out.println ("Este empleado no puede asesorar. Buscar personal de recepcion");
  38.         }
  39.     }
  40. }
Add Comment
Please, Sign In to add comment