Lecture22 New
Lecture22 New
Learning Objectives
• Template Functions
• Template Classes
Code Reuse
• Object-orientation provides strong code reuse
approaches
• Inheritance
• Composition
• Aggregation
• Templates is another powerful tool
Scenario
• We’ve implemented several algorithms so far:
“Doe
-45 12
”
< “Joe” ✓ -7 4 9 42
Compariso
Swapping Sorting
n