Question: Sickness Class Create a class called Sickness under a package edu.udc.cs2. Create 2 private attributes: symptoms and recoveryDays as a String and an int, respectively.

 Sickness Class Create a class called Sickness under a package edu.udc.cs2.

Sickness Class Create a class called Sickness under a package edu.udc.cs2. Create 2 private attributes: symptoms and recoveryDays as a String and an int, respectively. Create properly named setters and getters for the attributes. Create a 2-arg constructor that will set the initial values of these attributes. Instantiate an array of five Sickness instances called sickData with the following as symptoms and recoveryDays: "Fever, shortness of breath", 14 "Light cough, fatigue", 2 Create 3 more instance of your own for the remaining elements. Iterate the sickData array and for every instance which takes more than 5 days to recover, output see a doctor. Submit 2.java files, the class and the class that contains your main. If you have trouble, we can discuss next class with no lateness penalty

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!