Hi all, I'm not really pro and find my question quite hard to describe, so please ask if anything is unclear:
I have an abstract class called BaseDevice. Other devices, as Beacon and Transponder, inherit from BaseDevice. For example the Beacon, it has the BaseClass methods PLUS its own properties and methods. Let's say, the difference between these devices is that one has 2 LED's and one has a LCD
At the moment its not possible to make a device Transponder as well as Beacon (or i have to copypaste both into one new class, which is not wanted).
So, for example, I want to be able to make a Device say to it: "You have one LED", "You have 2 LCDs" or whatever. and all the methods and properties that come with it should be available. I still need to be able to see what device in my list of devices "Does he have one (or more) LED's"
Conclusion: I want to make turn my "Is A" into ""Has A" (as the Gang of Four recommend).
I have read once about the Factory Design Pattern which looked complicated. Would this be a good solution in this case?
Maybe I used some therms here that exceeds my knowledge, this project is the first one i used abstract classes etc. I'm really not that much of a Object Oriented Programmer. Design Patterns are quite hard for me to read, so answers that are easy to read are more than welcome.