Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(This is the hospital uses to following chart to classify their patients. ) 105.8

(This is the hospital uses to following chart to classify their patients. )

105.8<= temp "medical emergency "

100.4<= temp && temp <= 105.8 "hyperthermic"

99.5<= temp && temp <= 100.4 "hot"

97.7<= temp && temp <= 99.5 "normal"

96.8<= temp && temp <= 97.7 "cold"

In a class named "Lab4" write a public static method named "getTotalFrequencies" that takes a HashMap of String to ArrayList of Doubles (HashMap>) as a parameter and returns a HashMap of Strings to Integers. The parameter HashMap contains all the temperature information for all of the astronauts over their careers. The keys in the HashMap are the names of each astronaut and the values are all of their temperatures in an ArrayList of Doubles. The output is a HashMap representing the frequency of each category in the same format as the previous 2 parts. That is , the keys are Strings for the 6 different categories and the values are the number of times any astronaut has been classified into that category.

Part4: Now that the ER can generate reports for each astronaut , we want to go one step further and find the frequency of each category across all astronauts. This will help the medical staff prepare for the common cases as well as in improved space suits if necessary.

Temperatures :

HashMap> allTemps = new HashMap<>();

ArrayList temps() = new ArrayList<>();

temps().add(96.73);

temps().add(98.55);

temps().add(98.5);

temps().add(95.19);

temps().add(92.41);

allTemps.put("Thomas Pesquet", temps());

ArrayList temps 1 = new ArrayList<>();

temps1.add(104.18);

temps1.add(98.87);

temps1.add(100.66);

temps1.add(99.03);

ArrayList temps2 = new ArrayList<>();

temps2.add(97.29);

temps2.add(93.33);

temps2.add(95.9);

temps2.add(98.5);

89.6 <= temp && temp <= 96.8 "hypothermic"

temp < 89.6 "medical emergency"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions