Question: JAVA CODE NEEDED, THANK YOU! Simulate a smart home system. Sensors send sensor events to a central hub. Each sensor event has a timestamp, severity,

JAVA CODE NEEDED, THANK YOU!

Simulate a smart home system. Sensors send sensor events to a central hub. Each sensor event has a timestamp, severity, type and location. Notification worker threads consume events from the central hub. If the sensor event severity is low the event is logged (written on disk), if the severity is high the notification worker raises an alarm ( prints in the error console). In main test the program with 5 sensors and 3 workers. Solve the concurrent access to shared resources using synchronization, wait and notify or explicit locks. Sensors should continuously produce random events.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!