Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help with the default constructers and defining setBloodData and getBloodData in patient class Instructions that sets the fields to O and+, and an

i need help with the default constructers and defining setBloodData and getBloodData in patient class

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Instructions that sets the fields to O and+, and an overloaded constructor that requires values for both fields. Include get and set methods for each field 2. Create a class named Pattent that includes an ID number, age, and BloodData .Provide a default constructor that sets the ID number to 0, the age to 0, and the BloodData values to O and + Create an overloaded constructor that provides values for each field. Also provide get methods for each field Grading Write your java code in the area on the se the Run BloodData.ja.... Patient.java TestBloodD... TestPationt.j 1 public class Pattent (t 2 prtvate String id. 3 prtvate int age: 4 prtvate BloodData bloodData: 5 public Patient) 6 td age H 8. "0"; # 9. bloodData#new BloodData(); bloodType. String rhFactor) e age 11public Pattent(String d. tnt age. String BloodData ja. Patient java TestBmpd Da... TestPatient... 1 public class TestBloodData t 2 public static votd main(Stringt] args) ( BloodData bl new BloodData(): BloodData b2new BloodDataA" display(b1): display(b2) b1 setBloodType("AB" b1.setRhFactor) display(b) 8 public static votd display(BLoodData b) ( systen out priuntin( The blood is type b getBLoodType() b getRhfactor))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions