![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
vererbung
Diff: DateString.cpp
- Revision:
- 0:b65c5f2413b0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DateString.cpp Thu Apr 30 10:13:44 2015 +0000 @@ -0,0 +1,25 @@ +#include "DateString.h" +#include "RTC8563.h" + +// 2.Methode überschreiben +uint8_t DateString :: GetDay() +{ + + //uint8_t day = rtc_read(DAYS); + //return bcdToUint(day & ox3F); + + uint8_t day = Date::GetDay(); + // 3. Erweitern von Methoden der Basisklasse + day = day-5; + return day; + +}; + +// 4. Definieren einer neuen Methode + + +uint8_t DateString :: GetNextDay() +{ + uint8_t day = GetDay(); + return ++day; +} \ No newline at end of file