Question: Ex 1. Simulate a smart home system. Sensors send sensor events to a central hub. Each sensor event has a timestamp, severity, type, and location.

Ex 1. 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 severity of the sensor event is low, the event is logged (written to disk), if the severity is high, the notification agent raises an alarm (prints to the error console). In main test, the program with 5 sensors and 3 workers. Ex 2. Modify the previous problem to use a factory method for the new sensor types you want to create. Use the observer model. Post an alert if there is an alert. Simulate this situation.

I need this solved in SCALA programming language

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!