Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started