GatoBooster

Clinica/Paciente

Apr 30th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.83 KB | None | 0 0
  1. public class Paciente
  2. {
  3.    private String rut;
  4.    private String nombre;
  5.    private boolean alta;
  6.    private double peso;
  7.    private char sexo;
  8.  
  9.    public Paciente()
  10.    {
  11.    }
  12.    
  13.    public Paciente(String rut,String nombre,boolean alta,double peso,char sexo)
  14.    {
  15.      this.rut = rut;
  16.      this.nombre = nombre;
  17.      this.alta = alta;
  18.      this.peso = peso;
  19.      this.sexo = sexo;
  20.    }
  21.    
  22.    public String getRut()
  23.    {
  24.        return this.rut;
  25.    }
  26.    
  27.    public String getNombre()
  28.    {
  29.        return this.nombre;
  30.    }
  31.    
  32.    public boolean getAlta()
  33.    {
  34.        return this.alta;
  35.    }
  36.    
  37.    public double getPeso()
  38.    {
  39.        return this.peso;
  40.    }
  41.    
  42.    public char getSexo()
  43.    {
  44.        return this.sexo;
  45.    }
  46.    
  47.    public void setRut(String rut)
  48.    {
  49.        this.rut = rut;
  50.    }
  51.    
  52.    public void setNombre(String nombre)
  53.    {
  54.        this.nombre = nombre;
  55.    }
  56.    
  57.    public void setAlta(boolean alta)
  58.    {
  59.        this.alta = alta;
  60.    }
  61.    
  62.    public void setPeso(double peso)
  63.    {
  64.        this.peso = peso;
  65.    }
  66.    
  67.    public void setSexo(char sexo)
  68.    {
  69.        this.sexo = sexo;
  70.    }
  71.    
  72.    //Si de condición
  73.    
  74.    public String InfoAltadelPaciente(){
  75.     if(alta){
  76.      return "ALTA MÉDICA";
  77.     }
  78.     else if(alta == false){
  79.       return "NO TIENE ALTA MÉDICA";
  80.     }
  81.     else{
  82.         return "NADA";
  83.     }
  84.    }
  85.    
  86.    public void PrintPaciente()
  87.    {
  88.        System.out.println("____________________________________________");
  89.        System.out.println("               CLÍNICA SANITA               ");
  90.        System.out.println("____________________________________________");
  91.        System.out.println("1 "+this.getNombre()+" "+this.getPeso()+" "+InfoAltadelPaciente());
  92.    }
  93.    
  94.    public String AltadelPaciente(){
  95.     if(alta == false){  
  96.    {
  97.        
  98.    }
  99. }
  100.  
  101. }
Advertisement
Add Comment
Please, Sign In to add comment