1.docx

1. [P1_CompleteBloodCountDiagnosisTool] You have been asked to write a new tool for doctors for interpreting the results of a Complete Blood Count (CBC) (Links to an external site.)Links to an external site. Test.

The doctor will receive the test results as three values:

· Platelet Count: normal range is 150000 to 450000

· White Blood Cell Count: normal range is 5 to 10000

· Hemoglobin (red blood cell) Count: normal range is 12000 to 16000

Your tool should ask the doctor to input those three values, and then provide the doctor with a suggested diagnosis.  If all three values are within their normal range, then the tool should report "all normal". If all three values are below their normal range this may be indicative of a bone marrow disorder, and the tool should report "bone marrow disorder, possible infiltrative disease". For other values out of range:

· If the platelet count is below normal, then the tool should report "idiopathic thrombocytopenic purpura (ITP)"

· If the white blood cell count is high, this indicates a "probable infection", while a low white blood cell count indicates a "possible immune disorder"

· If the hemoglobin level is that might indicate a "possible polycythemia", otherwise if the hemoglobin level is low that is a result of "anemia, possible bleeding"

· For any other situation the tool should report "no diagnosis possible"

In the P1_CompleteBloodCountDiagnosisTool class I have provided a `main` method that collects the input values for you. Your goal is to write a method named `getDiagnosis` that has three parameters: the platelet level, white blood cell count, and hemoglobin level. It should return a String that is the diagnosis from the test results. There are two constraints for the `getDiagnosis` method:

1. `getDiagnosis` cannot print out anything, it must be return a String value to be printed out in `main`

2. `getDiagnosis` cannot use any String variables

 

Three example interactions:

Common Blood Count (CBC) Diagnosis Tool

Please enter the patient's platelet, white blood cell, and hemoglobin counts.

Platelet Count : 120000

White Blood Cell Count : 8000

Hemoglobin Count : 14000

Diagnosis is: idiopathic thrombocytopenic purpura (ITP)

Common Blood Count (CBC) Diagnosis Tool

Please enter the patient's platelet, white blood cell, and hemoglobin counts.

Platelet Count : 300000

White Blood Cell Count : 4000

Hemoglobin Count : 18000

Diagnosis is: possible polycythemia

Common Blood Count (CBC) Diagnosis Tool

Please enter the patient's platelet, white blood cell, and hemoglobin counts.

Platelet Count : 220000

White Blood Cell Count : 4500

Hemoglobin Count : 13000

Diagnosis is: all normal

Where I can do them in Eclipse: