Answer the question
In order to leave comments, you need to log in
What is the best way to design classes in this example?
There are devices controllers - Controllers, they have the same set of attributes. But they can be of different manufacturers and depending on the manufacturers different features and functions.
So far I have a Controller class :
return new ControllerVendor1(controller)
Devices: { {id: 1, vendor: "Vendor1"}, {id: 2, vendor: "Vendor2"} }
Controllers { {id: 1, name: "ctr1", deviceId: 1}, { id: 2, name: "ctr2", deviceId: 1}, { id:3, name: "ctr3", deviceId: 2} }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question