divide-and-conquer (section prune-and-searchalso known as decrease-and-conquer (section brute force (section the greedy method (section dynamic programming (section likewisesome of the software engineering design patterns we discuss includeposition (section adapter (section iterator (section template method (sections and composition (section comparator (section decorator (section rather than explain each of these concepts herehoweverwe introduce them throughout the text as noted above for each patternbe it for algorithm engineering or software engineeringwe explain its general use and we illustrate it with at least one concrete example inheritance and polymorphism to take advantage of hierarchical relationshipswhich are common in software projectsthe object-oriented design approach provides ways of reusing code inheritance the object-oriented paradigm provides modular and hierarchical organizing structure for reusing codethrough technique called inheritance this technique allows the design of general classes that can be specialized to more particular classeswith the specialized classes reusing the code from the general class the general classwhich is also known as base class or superclasscan define standard instance variables and methods that apply in multitude of situations class that specializesor extendsor inherits froma superclass need not give new implementations for the general methodsfor it inherits them it should only define those methods that are specialized for this particular subclass