Question: Remove all existing states variables in GreenhouseControls and replace them by using a collection of TwoTuple ( See examples in TIJ pages 6 2 1
Remove all existing states variables in GreenhouseControls and replace them by using a collection of TwoTuple See examples in TIJ pages to Each time an event runs it should add an entry that identifies the variable the event is modifying as key, and another object to this structure as the value the event is setting. Create a method in GreenhouseControls called setVariable to handle updating to this collection. Use the synchronization feature in java to ensure that two Event classes are not trying to add to the structure at the same time. Again make whatever changes are required to the overall design. Provide adequate methods to access the state variables.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
