Given a light and a two switch - create an object model that best represents both items.
Anonymous
Create a LightSource class and a Switch interface. Create a concrete Switch class to implement the Switch interface. Pass instances of the LightSource to the Switch to control the state of the LightSource. Implement a SwitchFactory to generate different types of switches that can control the LightSource.
Check out your Company Bowl for anonymous work chats.