Advertisement
Luca_G6

Banco.java

Mar 27th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.45 KB | None | 0 0
  1. package tp1e10_Clases;
  2.  
  3. public class Banco {
  4.     private int Cuit;
  5.     protected String Nombre_Banco;
  6.     private String Descripcion_Banco;
  7.     private int Nro_Clientes;
  8.     private int Nro_Empleados;
  9.     private String Sucursales;
  10.     private String Estado;
  11.     private String Horario_Atencion;
  12.    
  13.     public Banco() {   
  14.     }
  15.    
  16.     public Banco(int v_clientes, int v_empleados, String v_sucursales, String v_h_atencion) {
  17.         if (v_clientes >1 && v_empleados>1){
  18.         this.Nro_Clientes = v_clientes;
  19.         this.Nro_Empleados = v_empleados;
  20.         }else {
  21.             System.out.println ("Valores no admisibles");
  22.             this.Nro_Clientes = 10;
  23.             this.Nro_Empleados = 10;
  24.               }
  25.         if (v_sucursales != "" && v_h_atencion != ""){
  26.         this.Sucursales = v_sucursales;
  27.         this.Horario_Atencion = v_h_atencion;
  28.         }else {
  29.             System.out.println ("Valores no admisibles");
  30.             this.Sucursales = "No posee sucursales";
  31.             this.Horario_Atencion = "8:00hs a 13:00hs";
  32.         }  
  33.     }
  34.      
  35.     public void setAñadirEmpleado(int v_empleados) {
  36.         if (v_empleados>0) {
  37.         this.Nro_Empleados = this.Nro_Empleados + v_empleados;
  38.         }
  39.     }
  40.    
  41.     public void setAñadirCliente(int v_clientes) {
  42.         if (v_clientes>0){
  43.         this.Nro_Clientes = this.Nro_Clientes + v_clientes;
  44.         }
  45.     }
  46.    
  47.     public String getSucursales() {return this.Sucursales;}
  48.    
  49.     public String getHorarioDeAtencion() {return this.Horario_Atencion;}
  50.    
  51.    
  52.    
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement