Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is an example of a collator object public class Collator { private String label; private int numReadings; private int total; private int maximum; private

image text in transcribed

image text in transcribed

This is an example of a collator object

public class Collator { private String label; private int numReadings; private int total; private int maximum; private int minimum; Collator(String label) { this.label = label; numReadings = 0; total = 0; maximum = 0; minimum = 0; } void label(String label) { this.label = label; } String label() { return label; } void recordReading(int reading) { if (numReadingsmaximum) { maximum = reading; } // Check for a new minimum if (reading Exercise Four [25 marks Build a program called Meteorology that uses 3 Collator objects, one for temperature, one for pressure, one for humidity, and that behaves as follows Meteorology Program Make a selection and press return: 1. Record a temperature reading 2. Record a pressure reading 3. Record a humidity reading . Print maximum values 5. Print iimum values 6. Print average values 7. Quit Enter value: Make a selection and press return: 1. Record a temperature reading 2. Record a pressure reading 3. Record a humidity reading . Print maximum values 5. Print minimum values 6. Print average values 7. Quit Maximam temperature: 17 Maximam pressure: Maximam humidity: - Make a selection and press return: 1. Record a temperature reading 2. Record a pressure reading 3. Record a humidity reading . Print maximum values 5. Print inimum values 6. Print average values 7. Quit Enter value: 1020 Make a selection and press return: 1. Record a temperature reading 2. Record a pressure reading 3. Record a humidity reading . Print maximum values 5. Print miimum values 6. Print average values 7. Quit Enter value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Question

Describe the dual systems model of risk taking among adolescents.

Answered: 1 week ago