Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

This code was used to show creating a class with constructor overloading and function overloading (to show encapsulation and polymorphism). The final version shows creating inline functions (including within a composite class), using composition, overloading constructors and functions, and basic usage of a class with OOP concepts (Polymorphism and Encapsulation).

Working on G++ and CLang with C++ 14 or higher. Will generate warning for not used and should be const in certain version (this goes through several iterations so expect these to disappear towards later histories).

Known Issue with XCODE and Visual Studio

  • Use fabs instead of abs for the random number in the constructor