Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Paciente
- {
- private String rut;
- private String nombre;
- private boolean alta;
- private double peso;
- private char sexo;
- public Paciente()
- {
- }
- public Paciente(String rut,String nombre,boolean alta,double peso,char sexo)
- {
- this.rut = rut;
- this.nombre = nombre;
- this.alta = alta;
- this.peso = peso;
- this.sexo = sexo;
- }
- public String getRut()
- {
- return this.rut;
- }
- public String getNombre()
- {
- return this.nombre;
- }
- public boolean getAlta()
- {
- return this.alta;
- }
- public double getPeso()
- {
- return this.peso;
- }
- public char getSexo()
- {
- return this.sexo;
- }
- public void setRut(String rut)
- {
- this.rut = rut;
- }
- public void setNombre(String nombre)
- {
- this.nombre = nombre;
- }
- public void setAlta(boolean alta)
- {
- this.alta = alta;
- }
- public void setPeso(double peso)
- {
- this.peso = peso;
- }
- public void setSexo(char sexo)
- {
- this.sexo = sexo;
- }
- //Si de condición
- public String InfoAltadelPaciente(){
- if(alta){
- return "ALTA MÉDICA";
- }
- else if(alta == false){
- return "NO TIENE ALTA MÉDICA";
- }
- else{
- return "NADA";
- }
- }
- public void PrintPaciente()
- {
- System.out.println("____________________________________________");
- System.out.println(" CLÍNICA SANITA ");
- System.out.println("____________________________________________");
- System.out.println("1 "+this.getNombre()+" "+this.getPeso()+" "+InfoAltadelPaciente());
- }
- public String AltadelPaciente(){
- if(alta == false){
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment