How to use Inheritance and constructor overloading

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Jamess
Date:
Wed Aug 05 18:16:34 2015 +0000
Parent:
0:4731d40a338a
Commit message:
Heran?a;

Changed in this revision

Brother.cpp Show annotated file Show diff for this revision Revisions of this file
Brother.h Show annotated file Show diff for this revision Revisions of this file
Sister.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Brother.cpp	Wed Aug 05 17:27:08 2015 +0000
+++ b/Brother.cpp	Wed Aug 05 18:16:34 2015 +0000
@@ -3,6 +3,7 @@
 Brother::Brother(){
     
     age = 10;
+    howMuchMoney = 0;
     
     }
     
--- a/Brother.h	Wed Aug 05 17:27:08 2015 +0000
+++ b/Brother.h	Wed Aug 05 18:16:34 2015 +0000
@@ -15,7 +15,9 @@
         Brother(uint32_t myAge);
     
     protected:
-        //TODO    
+        //  Who has access 
+        //  Inherited classes
+        uint32_t howMuchMoney;
     
     };
 
--- a/Sister.cpp	Wed Aug 05 17:27:08 2015 +0000
+++ b/Sister.cpp	Wed Aug 05 18:16:34 2015 +0000
@@ -2,6 +2,6 @@
 
 Sister::Sister(){
         
-        //canot access age;
+       howMuchMoney = 0;
         
     }
\ No newline at end of file