1 /* 2 * testuhr.cpp 3 * 4 * Autor: H.Drachenfels 5 * Erstellt am: 16.5.2024 6 */
7 #include "testuhr.h"
8
9 testuhr::testuhr()
10 : stunde(0), minute(0)
11 { }
12
13 void testuhr::stellen(unsigned s, unsigned m)
14 {
15 this->stunde = (s + m / 60) % 24;
16 this->minute = m % 60;
17 }
18
19 void testuhr::ablesen(unsigned& s, unsigned& m) const
20 {
21 s = this->stunde;
22 m = this->minute;
23 }
24