Thiago .
/
OOP_Heranca
How to use Inheritance and constructor overloading
Diff: Brother.cpp
- Revision:
- 0:4731d40a338a
- Child:
- 1:6289618eacd1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Brother.cpp Wed Aug 05 17:27:08 2015 +0000 @@ -0,0 +1,25 @@ +#include "Brother.h" + +Brother::Brother(){ + + age = 10; + + } + +Brother::Brother(uint32_t myAge){ + + age = myAge; + + } + +uint32_t Brother::getAge(void){ + + return age; + + } +void Brother::setAge(uint32_t a){ + + age = a; + + } + \ No newline at end of file