CPlusOOP
SiteMap
Reusable Software
Structured Programming
Inheritance/Polymorphism
«Prev
Reusable Code
Polymorphism Concept
Comparing Conversion Operators
ADT Conversion
Conversion Member Functions
Signature Matching Algorithm
Operator Overloading
Unary Binary Overloading
friend Function Usage
friend Function - Quiz
Overloading Operators
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