Good, as you probably know, static inheritance is not possible in C #. I understand that, however, I adhere to the development of my program.
I will try to make it as simple as possible. Let's say that our code needs to manage the facilities that represent airplanes at any airport. The requirements are as follows:
There are members and methods that are used for all aircraft
There are many types of aircraft, each type may have its own additional methods and participants. There can be many instances for each type of aircraft.
Each type of aircraft should have a friendly name for this type and more detailed information about this type. For example, a class named F16 will have a static FriendlyName member with the value "Lockheed Martin F-16 Fighting Falcon".
Other programmers should be able to add more aircraft, although they should be used to create the same static data on aircraft types.
In some kind of graphical interface, the user should see a list of available types (with details such as FriendlyName) and add or remove aircraft instances saved, say, for some XML file.
So, basically, if I could apply inherited classes to implement static members and methods, I would apply plane types to static members like FriendlyName. Unfortunately, I cannot do this.
So what would be the best design for this scenario?
inheritance design c # oop
yellowblood
source share