4 Matching Annotations
- Jan 2021
-
www2.cs.sfu.ca www2.cs.sfu.ca
-
class Specific : public Base<Specific>
Use parametric polymorphism with inheritance,
-
Parametric Polymorphism
"Inheritance" is run time poluymorphism.
"Generic" is parametric poluymorphism. poluymorphism at complie time.
- A list of any types
- A list of some contraint types
-
This slide explore "design" in software engineering.
- Starts with Polymorphism. Composition is usually prefer over Inheritance.
-
-
www.cs.cmu.edu www.cs.cmu.edu
-
Two-complement: First bit is sign bit, interrupted as negative number.
10 = 01010 -> 8 + 2 = 10 -10 = 10110 -> -16 + 4 + 2 = 210
-