How it works...

The classes derived from the Trooper class are extensions of the Trooper class. We can say that each class is closed, because modifying it does not necessitate changing the original code. The Trooper class is also extensible because we have been able to easily extend the class by creating derived classes from it.

Another byproduct of this design is smaller, more manageable code that is easier to read and understand.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.107.25