diff options
| author | Syndamia <kamen@syndamia.com> | 2024-05-07 22:17:12 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2024-05-07 22:17:12 +0300 |
| commit | 88f15e35713c9632216931d26443dc588238732f (patch) | |
| tree | 147ff8c72009afc58d3eabb1c026a33b798f20fe /week10/Exercise04/Time12.cpp | |
| parent | f4642325f58172e85b9e41e35f69e8bea46f78c6 (diff) | |
| download | oop-2023-solutions-88f15e35713c9632216931d26443dc588238732f.tar oop-2023-solutions-88f15e35713c9632216931d26443dc588238732f.tar.gz oop-2023-solutions-88f15e35713c9632216931d26443dc588238732f.zip | |
[w10] Added rough solutions to ex 1-10
Diffstat (limited to 'week10/Exercise04/Time12.cpp')
| -rw-r--r-- | week10/Exercise04/Time12.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/week10/Exercise04/Time12.cpp b/week10/Exercise04/Time12.cpp new file mode 100644 index 0000000..3d1d681 --- /dev/null +++ b/week10/Exercise04/Time12.cpp @@ -0,0 +1,10 @@ +#include "Time12.h" +#include <iostream> + +Time12::Time12(unsigned hours, unsigned minutes, bool pm) : Time24(hours, minutes) { + this->pm = pm; +} + +void Time12::Print12() { + std::cout << hours << ":" << minutes << " " << (pm ? "PM" : "AM"); +} |
