First Challenge - SortMyChildren.java

Please write a program that will be run by a father/mother who has three children, where obviously each one of them has a unique first name and no twins; i.e. each child has a different age. Prompt the user to enter the first names of their three children along with their respective ages.

Your task is to display the children info sorted out by either name or age. You will ask the user as well to enter the sorting order, asc or desc, for ascending or descending, for names and for ages.

Default sorting order is asc for names and desc for ages. The user can choose any order for any category (age or name).

Sample Output 1:

Please enter the name of your first child: Michel
Please enter the age of your first child: 30
Please enter the name of your second child: Samantha
Please enter the age of your second child: 25
Please enter the name of your third child: Dominic
Please enter the age of your third child: 20
Please enter the sorting order of your children by name [asc]:
Please enter the sorting order of your children by age [desc]:
Your children names sorted alphabetically are Dominic, Michel, and Samantha
Your children names sorted by age are Michel, Samantha, and Dominic

Sample Output 2:

Please enter the name of your first child: Michel
Please enter the age of your first child: 30
Please enter the name of your second child: Samantha
Please enter the age of your second child: 25
Please enter the name of your third child: Dominic
Please enter the age of your third child: 20
Please enter the sorting order of your children by name [asc]: desc
Please enter the sorting order of your children by age [desc]: asc
Your children names sorted alphabetically are Samantha, Michel, and Dominic
Your children names sorted by age are Dominic, Samantha, and Michel

Second Challenge - HelpMe.java

Your job here is to direct a sick user whether they need to stay home, go visit a walk-in clinic, go to ER (Emergency Room) or call 911 for an ambulance.

We will assume that the user is not feeling well and that they are running your program for guidance.

You will need to ask the user for their symptoms by offering them to pick from a list of five: nausea, dizziness, fever, headache and vomit. Based on their answers, you need to determine which of these five symptoms they are experiencing. They can be experiencing none and up to all of them.

You will prompt the user to enter their body temperature in Celsius (C ) or Fahrenheit (F ), by entering a decimal number with a capital F or capital C at the end of it.

If temperature is above 38 (C ) but below 39 (C ) inclusive, and experiencing three or more of the symptoms

  • Your program should recommend that they go visit a walk-in clinic
  • Your program should display their temperature in Celsius and Fahrenheit

If temperature is above 39 (C ) but below 40 (C ) inclusive, and experiencing four or more of the symptoms

  • Your program should recommend that they go to ER
  • Your program should display their temperature in Celsius and Fahrenheit

If temperature is above 40 (C ) and experiencing all the symptoms

  • Your program should recommend that they call for an ambulance immediately by dialing 911
  • Your program should display their temperature in Celsius and Fahrenheit

If they do not meet any of the conditions listed above

  • Your program should recommend that they need to rest, take Advil or Tylenol, drink lots of Gatorade and stay home
  • Your program should display their temperature in Celsius and Fahrenheit
Sample Output:
< Optional: some one-line intro about your program>
< I will leave you to determine how to ask the user to indicate which symptoms they are experiencing>
Please enter your body temperature in Celsius or Fahrenheit by appending a C or an F to the temperature
value: 37.5C
< Your program should display the recommendation as stated above>
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.