Curso de Java SE Orientado a Objetos

Curso de Java SE Orientado a Objetos

Anahí Salgado Díaz de la Vega

Anahí Salgado Díaz de la Vega

¡Reto!

11/38

Lectura

¡Has avanzado muy bien!

Ahora estás listo para resolver tu primer reto que en realidad es muy sencillo de hacer.

Mira el siguiente diagrama y construye la clase Patient.

Patient
name: String
email:String
address: String
phoneNumber: String
birthday: String
weight: double
height: double
blood: String
Patient(name: String, email: String)

Aportes 392

Preguntas 1

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad? Crea una cuenta o inicia sesión.

Hice el diagrama de clase UML, pero no sé si el constructor deba ir en la parte de comportamiento 😕

😄

public class Patient {

    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    public Patient(String name, String email ){
        this.name = name;
        this.email = email;
    }

}

😛

public class Patient {

    static int id;
    String name, email, address, phoneNumber, birthday, blood;
    double weight, height;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
        System.out.println("Nombre: " + name + "Email: " + email);
        id++;
    }
}```

Dejo mi reto! 😃

public class Patient {

    String name,
           email,
           address,
           phoneNumber,
           birthday,
           blood;
    
    double weight,
           height;
    
    public Patient(String name, String email) {
        this.name = name;
        this.email = email;
    }        
}

🐱‍💻 Completando el reto propuesto.

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;
    
    Patient(String name, String email) {
        System.out.println("Patient Name: " + name + "\nPatient Email: " + email);
    }
}

public class Patient {
private String name;
private String email;
private String address;
private String phoneNumber;
private String birthday;
private double weight;
private double heigth;
private String blood;

public Patient(String name, String email) {
    this.name = name;
    this.email = email;
}

}

Creacion de la Clase Patient

public class Patient {
    //Atributos
    int id;
    private String name;
    private String email;
    private String address;
    private String phoneNumber;
    private String birthday;
    private double weight;
    private double height;
    private String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }

respuesta…

public class Patient {
    String name;
    String email;
    String Address;
    String phoneNumber;
    String birthay;
    Double weigth;
    Double height;
    String blood;

    Patient(String name, String email){
        System.out.println("construyendo Paciente");
    }```
public class Patient {
    String name, email, address, birthday, blood;
    double weight, height;
    
    public Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}

Completado ❤️

public class Patient {
    private String name;
    private String email;
    private String address;
    private String phoneNumber;
    private String birthday;
    private double weight;
    private double height;
    private String blood;

    // Constructor
    public Patient(String name, String email) {
        setName(name);
        setEmail(email);
    }

    
    // Getters & Setters region
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}

La clase patient

public class Patient {
    static int nextValidId = 0;
    int id;
    String name;
    String email;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email) {
        id = nextValidId++;
        this.name = name;
        this.email = email;
    }
}
public class Patient {

    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

 Patient(String name, String email) {
             this.name = name;
             this.email = email;
    }
}

Done!

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){

    }
}```

Este es mi paciente:

public class Patient {
    String name;
    String email;
    String adresss;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    public Patient (String name, String email){
        this.name = name;
        this.email = email;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAdresss() {
        return adresss;
    }

    public void setAdresss(String adresss) {
        this.adresss = adresss;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getBlood() {
        return blood;
    }

    public void setBlood(String blood) {
        this.blood = blood;
    }
}

public class Patient {
    // Creación de atributos
    public String name;
    public String email;
    public String address;
    public String phoneNumber;
    public String birthdat;
    public double weight;
    public double height;
    public String blood;
    
    // Método / Constructor
    public Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
    
    // Generar Getter and Setter de atributos

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getBirthdat() {
        return birthdat;
    }

    public void setBirthdat(String birthdat) {
        this.birthdat = birthdat;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getBlood() {
        return blood;
    }

    public void setBlood(String blood) {
        this.blood = blood;
    }
}```

Mi solucion =>

public class Patient {
    static int id;
    private String name;
    private String email;
    private String address;
    private String phoneNumber;
    private String birthday;
    private Double weight;
    private Double height;
    private String blood;

    Patient(String name, String email) {
        this.name = name;
        this.email = email;
    }
}

Aclaracion: Se perfectamente que pude haberlo hecho mejor, me di cuenta al ver otras soluciones propuestas por todos… Es muy bueno esto de poder aportar cada uno su solucion para aprender mejor.

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double wight;
    double height;
    String blood;

    Patient(String name, String email) {
      this.name = name;
      this.email = email;
    }
}

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}```
public class Patient {
    String name,email,addres, phoneNumber, birthay, blood;
    double weight, height;

        Patient (String name , String email){
        this.name = name;
        this.email = email;
    }
}

public class Patient {
int id;
String name,email,phoneNumber,birthday,blood;
double weight,height;

Patiend(String name, String email ){
	this.name = name;
	this.email = email;
}

public void toString(){
	system.out.println("Name :: " + name + " Email :: " + email);
}

}

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;
     Patient(String name,String email){
    this.name=name;
    this.email=email;
     };
}

quise hacer otros metodos tambien.

public class Patient {
    String name;
    String Email;
    String address;
    String phoneNumber;
    String birthday;
    String weight;
    double height;
    String blood;

   Patient(String name, String email ){
       this.name= name;
       this.name =email;
   }
    public void showPatientPersonalData(String name, String Email, String address, String phoneNumber, String birthday){
    this.name=name;
    this.Email= Email;
    this.address= address;
    this.phoneNumber = phoneNumber;
    this.birthday = birthday;

        System.out.println("los  datos   recibidos  son los  siguientes: ");
        System.out.println("nombre  del paciente: "+ name);
        System.out.println("Email: "+ Email);
        System.out.println("direccion de  residencia: "+ address);
        System.out.println("Numero Telefonico: "+ phoneNumber);
        System.out.println("Fecha de  naciemiento: "+birthday);



    }

    public void  showPatientMedicalData(String blood,String weight, double height){
        
        System.out.println("tipo de  sangre: "+ blood);
        System.out.println(" peso: "+ weight);
        System.out.println("height: "+ height);

    }

}

public class Patient {
public String name;
public String email;
public String address;
public String phoneNumber;
public String birthday;
public Double weight;
public Double height;
public String blood;

 Patient (){
     System.out.println("Construyendo Patient");
 }

 public Patient (String name, String email){
     this.name = name;
     this.email = email;


 }

}

public class Patient {
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

Patient(String name, String email) {
    this.name = name;
    this.email = email;
}

}

//posible solucion

public class Patient {
String name,
email,
addres,
phoneNumber,
birthay,
blood;
double weight, height;

    Patient (String name , String email){
    this.name = name;
    this.email = email;
}

}

| RETO |

package me.platzi.poo.se;

public class Patient {
	public static int id = 0;
	public String name;
	public String email;
	public String address;
	public String phoneNumer;
	public String birthday;
	public double weight;
	public double height;
	public String blood;
	
	Patient(String name, String email) {
		System.out.println("Construyendo el Objeto Patient");
		id++;
		this.name = name;
		this.email = email;
	}
}

public class Patient {

String name;
String email;
String address;
String phoneNumber;
String birthday;
Double weight;
Double height;
String blood;

Patient (String name, String email) {
	
}

}

Una buena práctica.

public class Patient {
    public String name;
    public String email;
    public String address;
    public String phoneNumber;
    public String birthday;
    public double weight;
    public double height;
    public String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }

}
 
public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }

}

Clase patient

<public class Patient {
    String name;
    String email;
    String Address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;
    Patient(String name,String email){
        this.name = name;
        this.email = email;
    }
}> 
public class patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    String blood;
    double weight;
    double height;
    static long id = 0;

    patient(String name, String email){
        id++;
        System.out.println("Creating the object -patient- with name " + name + ", id " + id +" and email " + email);
        this.name = name;
        this.email = email;
    }
}

Clase Patient:

public class Patient {
    String name;
    String email;
    String addres;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    public Patient (String name, String email){

        this.name = name;
        this.email = email;

    }

}

public class Patient {
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood ;

public Patient (String name , String email){
    this.name = name;
    this.email = email;

}

}

![](

**Reto **😁

Este es el código que me ayudó a realizar el reto!! 😄

public class Patiente {
    //Atributos
    String name;
    String email;
    String address;
    int phoneNumber;
    String birthday;
    Double weight;
    Double height;
    String blood;

    //Métodos
    Patiente(String name, String email){
        this.name = name;
        this.email = email;
    }
}

public class Patient {

String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

public Patient(String name, String email ){
    this.name = name;
    this.email = email;
}

}

Reto hecho ✅ satisfactoriamente 🥺

//Clase Principal
import static littleboy.UIMenu.showMenu;
public class main {
    public static void main(String[] args) {
    
   //showMenu();
   dortor mydortor=new dortor("Alexis", "Dentista"); 
   System.out.println(mydortor.name);
   System.out.println(mydortor.speciality);
   Patient iampatient=new Patient("Lalo","[email protected]");
    }//2  
}//1
//Clase Patient
public class Patient {
    String name,email,address,phoneNumber,birthday,blood;
    double weight,height;
    Patient(String name, String email){
        this.name=name;
        this.email=email;
        System.out.println("nombre: "+name+" Email: "+email);
        }
    }


¡¡¡ Esto va a ser épico papus !!!

<
public class Patient {
    static int id = 0;
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    String blood;
    double weight;
    double height;

    Patient(String name, String email){
        this.name = name;
        this.email= email;
        id++;

    }
}
> 

public class Patient {

String name;
String email;
String address;
String phoneNumber;
String birthday;
String blood;
double weight;
double height;

Patient(String name, String email){
    this.name = name;
    this.email = email;
}

}

public class Patient {
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

public Patient(String name, String email){
    this.name = name;
    this.email = email;
    System.out.println("El nombre del paciente es: "+name);
    System.out.println("El email del paciente es: "+email);
}

}

Cordial saludo. Anexo aporte para su revisión; quedo atento:

public class Patient {
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

Patient(){
    
}

Patient(String name, String email){
    this.name = name;
    this.email = email;
}

}

public class Patient {
//Atributos
	String name, email, address, phoneNumber, blood, birthday;
	double weight, height;
//Métodos
public static Patient (String name, String email){
	this.name = name;
	this.email = email;
} 
}
public class Patient {
    //Attributes
    static int id=0;
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    //Constructor
    Patient(String name, String email){
        id++;
        System.out.println("Paciente "+ name +"instanciado");
        this.name = name;
        this.email = email;
    }
}

public class Patient {

//Definición de Atributos
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

//Metodo constructor: Asignación de parametros
Patient( String name, String email) {
    this.name = name;
    this.email = email;
}

}

public class Patient {
    //Atributos
    String name;
    String email;
    String adress;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        System.out.println("El nombre del paciente es " + name + " y su correo es " + email);
        this.name = name;
        this.email = email;
    }
}
public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}

public class Patient {
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

public Patient(String name, String email){
    this.name = name;
    this.email = email;
}

public void showName(){
    System.out.println("Patient name: "+name);
}

}

Mi aporte

public class Patient {
    // attributes
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    // constructor
    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}
public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
    this.name = name;
    this.email = email;
    }
}
public class Patient {

   /* name: String
    email:String
    address: String
    phoneNumber: String
    birthday: String
    weight: double
    height: double
    blood: String
    Patient(name: String, email: String)*/

    public String name;
    public String email;
    public String address;
    public String phoneNumber;
    public String birthday;
    public double weight;
    public double height;
    public String blood;

    Patient(String name, String email){

        this.name = name;
        this.email = email;

    }
}

public class Patient {
    String name;
    String email;
    String adress;
    String phoneNumber;
    String Birthday;
    double wight;
    double height;
    String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;

    }

}

public class Patient {
    
    public String name;
    public String email;
    public String address;
    public  String phoneNumber;
    public  String birthday;
    public  double weight;
    public double height;
    public String blood;

    public Patient(String name, String email){
    this.name = name;
    this.email = email;
    }
}

Dejo mi clase Patient, solo que como url ya que no puedo agregarla foto desde Mozilla (Si , ya se que puedo usar Chrome pero honestamente no deseo cambiar de navegador por el momento)

https://imgur.com/sRujFaE


/**
 * Description: Clase para crear nuevos pacientes
 * */
public class Patient {
    private static int auxId = 0;
    private int id;
    private String name;
    private String email;
    private String address;
    private String phoneNumber;
    private String birthDay;
    private double weight;
    private double height;
    private String blood;

    /**
     * Descriptio: Constructor de nuevos pacientes.
     * @param name <i>String</i> Nombre del paciente.
     * @param email <i>String</i> email del paciente.
     * @autor Leonardo Fabio Mercado Benítez
     *
     * */
    public Patient(String name, String email){
        this.id = auxId++;
        this.name = name;
        this.email = email;
    }

    /**
     * Description: Función para mostrar todos los datos del paciente.
     */
    public void showPatient(){
        System.out.println(
                        "*********************************************\n" +
                        "PATIENTE DATA:\n" +
                        "id: [" + this.id + "]\n" +
                        "name: [" + this.name + "]\n" +
                        "email: [" + this.email + "]\n" +
                        "address: [" + this.address + "]\n" +
                        "phone number: [" + this.phoneNumber + "]\n" +
                        "birth day: [" + this.birthDay + "]\n" +
                        "weight: [" + this.weight + "]\n" +
                        "height: [" + this.height + "]\n" +
                        "blood: [" + this.blood + "]\n" +
                        "*********************************************\n"
        );
    }


    //-----------GETTERS AND SETTERS TO PATIENT------------------
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(String birthDay) {
        this.birthDay = birthDay;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getBlood() {
        return blood;
    }

    public void setBlood(String blood) {
        this.blood = blood;
    }

    //---------------------------------------------------------------------

}

Mi reto:

Clase patients

import java.util.Scanner;
public class patients {
    // atributos
    static int cont = 0;
    private String name;
    private String email;
    private String address;
    private String phoneNumber;
    private String birthday;
    private double weight;
    private double height;
    private String blood;

    patients(){
    cont++;
    }

    patients(String name ,String email ){
    this.name=name;
    this.email=email;
    this.address=address;
    this.phoneNumber=phoneNumber;
    this.birthday=birthday;
    this.weight=weight;
    this.height=height;
    this.blood = blood;
        System.out.println("Hello "+ name);
        System.out.println( "Email :" + email);
    datos(address,phoneNumber,birthday,weight,height,blood);
    }

    static void datos(String address, String phoneNumber, String birthday, double weight, double height ,String blood ){
        Scanner s = new Scanner(System.in);
        System.out.print("Ingrese su dirección: ");
        address = s.nextLine();
        System.out.print("Ingrese su número telefónico:  ");
        phoneNumber = s.nextLine();
        System.out.print("Ingrese su fecha de nacimiento:  ");
        birthday = s.nextLine();
        System.out.print("Ingrese su peso:  ");
        weight = s.nextDouble();
        System.out.print("Ingrese su altura:  ");
        height = s.nextDouble();
        System.out.print("Ingrese su tipo de sangre:  ");
        blood = s.next();

        mostrarDatos(address,phoneNumber,birthday,weight,height,blood);
    }
    static void mostrarDatos(String address, String phoneNumber, String birthday, double weight, double height ,String blood){
        patients.cont++;
        System.out.println("-------Dato "+ cont + "------");
        System.out.println("Dirección: "+ address );
        System.out.println("úmero telefónico: " + phoneNumber);
        System.out.println("fecha de nacimiento: " + birthday);
        System.out.println("peso: " +weight);
        System.out.println("altura: "+height );
        System.out.println("sangre: " + blood);

    }


Mi main principal

public class registro {
    public static void main(String[] args) {
    patients pa = new patients ("angelo ", "[email protected]");


    }
}

public class Patient {
private String name;
private String email;
private String address;
private String phoneNumber;
private String birthday;
private double weigth;
private double heigth;
private String blood;

public Patient(String name, String email) {
    this.name = name;
    this.email = email;
}

}

public class Patient {

String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

Patient(String name,String email){
    this.name = name;
    this. email = email;
}

}

Holi 🖖 esta es la clase en código junto con su constructor, adicional cree los getters y setters para leer y escribir los atributos.

public class Patient {

    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    public Patient(String name, String email ){
        this.name = name;
        this.email = email;
    }

}

¡Listo!

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}

package com.personalproject.controller.entities;

public class Patient
{
String name, email, address, phoneNumber, birthday, blood;
double weight, height;

Patient (String name, String email)
{
	this.name	= name;
	this.email	= email;
}

public String getName() 
{
	return name;
}

public void setName(String name) 
{
	this.name = name;
}

public String getEmail() 
{
	return email;
}

public void setEmail(String email) 
{
	this.email = email;
}

public String getAddress()	
{
	return address;
}

public void setAddress(String address) 
{
	this.address = address;
}

public String getPhoneNumber() 
{
	return phoneNumber;
}

public void setPhoneNumber(String phoneNumber) 
{
	this.phoneNumber = phoneNumber;
}

public String getBirthday() 
{
	return birthday;
}

public void setBirthday(String birthday) 
{
	this.birthday = birthday;
}

public String getBlood() 
{
	return blood;
}

public void setBlood(String blood) 
{
	this.blood = blood;
}

public double getWeight() 
{
	return weight;
}

public void setWeight(double weight) 
{
	this.weight = weight;
}

public double getHeight() 
{
	return height;
}

public void setHeight(double height) 
{
	this.height = height;
}

public String toString ()
{
	return 	"Name: " 	+ getName () 	+	"		" 	+
			"Email: "	+ getEmail ()	; 
}

}
![]([url](```
url

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    String blood;
    double weight;
    double height;
    
    Patient(String name, String email) {
        this.name = name;
        this.email = email;
    }
} 
public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    Double weight;
    Double height;
    String blood;

    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}

public class Patient {
// Atributos
String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

//Constructor
Patient(String name, String email){
this.name=name;
this.email=email;
}
}

mi class Patient

public class Patient {
	public String name;
	public String email;
	public String address;
	public String phoneNumber;
	public String birthday;
	public double weight;
	public double height;
	public String blood;

	public Patient(String name, String email) {
		this.name = name;
		this.email = email;
	}
}

mi reto!

public class Patient {

    static int id = 0;
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;


    Patient(String name,String email){

        id++;
        this.name = name;
        this.email = email;

    }

}

public class Patient {
    public static void main(String[] args){
      
      int id = 0; //Autoincrement
      String name;
      String email;
      String adrdress;
      String phoneNumber;
      String birthday;
      double weight;
      double height;
      String blood;
//Contructor
    Patient(){
      System.out.println("Gracias al equipo de Platzi por esta oportunidad de poder ser correjido por personas expertas, agradesco la critica");
  }
    public Patient (String name, String email){
      this.name = name;
      this.name = email;
    }
  }
}

Mi clase Pattient:

<public class Patient {

    static int id = 0;
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        id++;
        this.name = name;
        this.email = email;

    }
}
> 

He definido los atributos como privados para evitar romper el encapsulamiento.

public class Patient {
	private String name;
	private String email;
	private String address;
	private String phoneNumber;
	private String birthday;
	private String blood;
	private double weight;
	private double height;
	
	Patient(String name, String email) {
		this.name = name;
		this.email = email;
	}
}

Listo!

🤠

public class Patient {
    String name, email, address, phoneNumber, birthday;
    double weight, heigh;
    String blood;
    
    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
    
}
public classPatient{
    // Attributes 
    public String name;
    public String email;
    public String address;
    public String phoneNumber;
    public String birthday;
    publicdouble weight;
    publicdouble height;
    public String blood;

    // Constructor
    Patient(String name, String email) {
        this.name = name;
        this.email = email;
    }
}

Cumpliendo y un poquito extra

public class Patient {
    String name;
    String email;
    String adress;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blod;

    public Patient(String name, String email) {
        this.name = name;
        this.email = email;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getBlod() {
        return blod;
    }

    public void setBlod(String blod) {
        this.blod = blod;
    }
}
public class Patient{
//Variables de instancia
private String name;
private String email;
private String address;
private String phoneNumber;
private String birthday;
private double weight;
private double height;
private String blood;

// Constructor
Patient(String name, String email) {
    this.name = name;
    this.email = email;
}

Queridos Platzinautas, les comparto mi reto:
💚💻

💚💻
Diseño de clase en StarUML:

Reto completado

public class Patient {
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;
    
    Patient(String name, String email){
        this.name = name;
        this.email = email;
    }
}
public class Patient {

    public String name;
    public String email;
    public String address;
    public String phoneNumber;
    public String brithday;
    public double weight;
    public double heigh;
    public String blood;

    public Patient(String name, String email)
    {
        this.name = name;
        this.email = email;
    }
}

public class Patient {
    //Atributos
    String name;
    String email;
    String address;
    String phoneNumber;
    String birthday;
    double weight;
    double height;
    String blood;

    Patient(String name, String email){
        
    }

}

public class Patient {
  String name;
  String email;
  String address; 
  String phoneNumber;
  String birthday; 
  double wewight;
  double height;
  String blood;

  Patient(String name, String email){
    this.name=name;
    this.email=email; 
  }
}

public class Patient {

String name;
String email;
String address;
String phoneNumber;
String birthday;
double weight;
double height;
String blood;

public Patient(String name, String email) {
	this.name = name;
	this.email = email;
}

}

public class Patient {
    public String name;
    public String email;
    public String address;
    public String phoneNumber;
    public String birthday;
    public double weight;
    public double height;
    public String blood;

    //Constructor
    Patient(String name, String email){
       this.name = name;
       this.email = email;
    }
}

😄

public class Patient {
	private String name;
	private String email;
	private String phoneNumber,
	private String birthDate;
	private double weight;
	private double height;
	private String blood;
	
	Patient(String name, String email){
		this.name = name;
		this.email = email;
	}
}