In this problem, we will simulate data collection from a soil temperature loT device by using two classess, SoilTempData and SoidTempIoT classes. The SoilTempData automatically collects soil temperature data every 100 ms. Also, it reports the statistics of the collected data every 1000 ms. The SoilTempData get the temperature from a soil temperature loT device, SoidTempIoT. ur job is to implement two classes, SoilTempData and SoidTempIoT 1.1. SoilTempIoT class randomly picks a temperature ranging from 10 to 60°C. This class has temp an instance variable to keep the latest temperature MIN_TEMP and MAx_TEMP are two constants that can be used as a possible range of the temperature. get Temp() method returns the latest temperature simulated as reading a temperature from the loT. Every time that there is a reading (calling get Temp()), before returning the current temperature, this method generates a new random temp (+ 10°C from the previous value) for the next round of reading. Note that when the temperature change + 10°C from the previous value makes sure that it is always in its possible range (10-60). einterface» ActionListener Java API Timer SoilTempData REPORT ROUND: int = 10 (readOnly) SoilTemploT -data: Integer(") (collection="ArrayList") -round: int -nextPrintindex: int +MIN TEMP: int = 10 (readOnly) -lot +MAX TEMP: Int = 60 (readonly -temp: int -rand: Random -time: Timer «Constructor»+SollTempData(iot: SolTemploT) +start(): void +actionPerformed(e: ActionEvent): void +printStat(): vold «constructor»+SoiITemploTO +getTemp(: int 1.2. SoilTempData class has variables: time is a javax.swing.Timer using for triggering the time event data is an ArrayList keeping the collection of temperature that were read so far. round is used for counting the round in order to print the graph. Thus, this value is used for comparing to the REPORT ROUND to check whether it is the round that needs to print the graph yet. nextPrintIndex keeps the starting position of the next print. REPORT ROUND is a constant (1000/100 = 10) to check whether it is the time to print the stat. methods: Constructor initializes proper values to data, round, nextPrintIndex, time and temp
In this problem, we will simulate data collection from a soil temperature loT device by using two classess, SoilTempData and SoidTempIoT classes. The SoilTempData automatically collects soil temperature data every 100 ms. Also, it reports the statistics of the collected data every 1000 ms. The SoilTempData get the temperature from a soil temperature loT device, SoidTempIoT. ur job is to implement two classes, SoilTempData and SoidTempIoT 1.1. SoilTempIoT class randomly picks a temperature ranging from 10 to 60°C. This class has temp an instance variable to keep the latest temperature MIN_TEMP and MAx_TEMP are two constants that can be used as a possible range of the temperature. get Temp() method returns the latest temperature simulated as reading a temperature from the loT. Every time that there is a reading (calling get Temp()), before returning the current temperature, this method generates a new random temp (+ 10°C from the previous value) for the next round of reading. Note that when the temperature change + 10°C from the previous value makes sure that it is always in its possible range (10-60). einterface» ActionListener Java API Timer SoilTempData REPORT ROUND: int = 10 (readOnly) SoilTemploT -data: Integer(") (collection="ArrayList") -round: int -nextPrintindex: int +MIN TEMP: int = 10 (readOnly) -lot +MAX TEMP: Int = 60 (readonly -temp: int -rand: Random -time: Timer «Constructor»+SollTempData(iot: SolTemploT) +start(): void +actionPerformed(e: ActionEvent): void +printStat(): vold «constructor»+SoiITemploTO +getTemp(: int 1.2. SoilTempData class has variables: time is a javax.swing.Timer using for triggering the time event data is an ArrayList keeping the collection of temperature that were read so far. round is used for counting the round in order to print the graph. Thus, this value is used for comparing to the REPORT ROUND to check whether it is the round that needs to print the graph yet. nextPrintIndex keeps the starting position of the next print. REPORT ROUND is a constant (1000/100 = 10) to check whether it is the time to print the stat. methods: Constructor initializes proper values to data, round, nextPrintIndex, time and temp
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Read all the information in the picture, and I gave
- follow the class diagram
- Coding SoilTempData.java following the class diagram
- Coding SoilTempIoT.java following the class diagram
- Use SoilTempDataTest.java as a test
- Make the output like the result
and don't forget a popup message
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education