QUESTION

I need help with my programming exercise 4-4. I need to make sure BloodData has the correct default values, BloodData class contains get and set methods for BloodType and RhFactor, BloodData has overloaded constructor, Patient has the correct default values, the Patient class contains get and set methods for id, age, and BloodData, and the Patient class works as expected. I've tried everything and none of it works. So, take your best shot.

 

 

 

 

public class BloodData {

    private String bloodType;

    private String rhFactor;

    public BloodData() {

    }

    public BloodData(String bType, String rh) {

    }

    public void setBloodType(String bType) {

    }

    public String getBloodType() {

    }

    public void setRhFactor(String rh) {

    }

    public String getRhFactor() {

    }

}

public class Patient {

    private String id;

    private int age;

    private BloodData bloodData;

    public Patient() {

    }

    public Patient(String id, int age, String bType, String rhFactor) {

    }

    public String getId() {

    }

    public void setId(String id) {

    }

    public int getAge() {

    }

    public void setAge(int age) {

    }

    public BloodData getBloodData() {

    }

    public void setBloodData(BloodData b) {

    }

}

 

Public Answer

U3FNGS The First Answerer