CPlusOOP
SiteMap
Reusable Software
Structured Programming
Inheritance/Polymorphism
«Prev
Reusable Code
Polymorphism Concept
Define Polymorphism Concept
Difference Conversion Overloading
ADT Conversion
Conversion Member Functions
Comparing Conversion Operators
Compiler Selects Overloaded Function
Signature Matching Algorithm
Selection Algorithm Function Overloading
Overloaded Function Example
Using Polymorphism Conclusion
Operator Overloading
Overload Operators
Overloadable Operator Types
Declare Friend Function
friend Function Usage
Operator Keyword
Unary Binary Operator Overloading
Overloading Unary Operators
Overloading Binary Operators
Overloading Assignment Operator
Input Output Operators
Overloading Output Operator
Overloading Input Operator
Overloading Pointer Operator
Overloading New Delete
Operator Overloading Guidelines
Overloading Operators Summary
friend Function - Quiz
Pure Polymorphism
Define Class Inheritance
Pure Polymorphism
Derived Class
Public Inheritance
public Inheritance - Quiz
Constructors Base
Reference Typing Conversions
print member-function
Virtual Functions
Guidelines Virtual Functions
Virtual Function - Selection
Virtual Function - Exercise
Abstract Classes
Reinterpret const cast
Dynamic cast Operator
RTTI
typeid Operator
throw C++ Exception
Pure Polymorphism Conclusion
Ecological Simulation
C++ Classes Subtypes - Exercise
Classes and Subtypes
Objective:
Determine whether several pairs of example classes fit the definition of class and subtypes.
Instructions
This is a two-part exercise:
1) Below are examples of possible class/subtype pairs. Examine the pairs and decide which ones fit the definition of a class and its subtypes.
Class
Subtype
Number
BigInteger
Shape
Circle
Circle
Square
Employee
Manager
Verb
Noun
Type the appropriate pairs below and justify your choices.
2) Create 5 example pairs of your own that fit the class/subtype definition.
Type your example pairs below, then click the Submit button when you are ready to submit this exercise.
Submit