I’ll talk layman
Consider this hypothesis : An auto parts supplier ABC deals with manufacturing steering wheels for XYZ a major brand of automobile.
XYZ may have several models all “MAY BE” having different cosmetic desing but following the same standard spec for steering wheel rod
and other mechanical accessories like wheel bearings etc. Now, vendors like ABC and EFG want to bulk mfg steerings that conform to
XYZ’s requrirements. XYZ provides them with a spec –> ” Interface ( or contract ) in S/W design parlance”. ABC, EFG or any other vendor
interested in selling their steering wheels to XYZ should conform to the standard interface that XYZ has provided. In situations where
ABC falls short of inventory, XYZ can use EFG’s supplied part with relative ease the reason: Both confirm to a standard interface.
Internally, ABC and EFG might have their own design standards for cosmetics, colors, dyes etc. They can use some basic standard spec that
can or cannot be inherited by some or all the steering wheels they produce. On general example would be that every steering has a ABC
inprint or some sort of trademark. This trademarking process is inherited by all the steering wheels no matter what size of spec a.k.a
“Interface” they conform to. ABC or EFG can mfg steerings conforming to other “Interfaces” provided by some other major brand other than
XYZ but still keeping the trademarking process consistent. This trademarking process relates to –> ” Abstract class and Inheritance in
S/W design parlance”.
Another thing worth noting here is that XYZ may inturn be inheriting or contracting with some other super vendors or other part mfgs and
thier interfaces leading to inheritance. Same applies to abstract classes, one abstract class extends other and so on and so forth.
Hope this helps.
14 Comments