diff options
Added old work from practicum 11
1 files changed, 12 insertions, 0 deletions
| -rw-r--r-- | Year 1/Object-oriented Programming/11-Practice-10.05.2022/Battery.cpp | 12 |
diff --git a/Year 1/Object-oriented Programming/11-Practice-10.05.2022/Battery.cpp b/Year 1/Object-oriented Programming/11-Practice-10.05.2022/Battery.cpp new file mode 100644 index 0000000..6fcbb76 --- /dev/null +++ b/Year 1/Object-oriented Programming/11-Practice-10.05.2022/Battery.cpp @@ -0,0 +1,12 @@ +#include "Battery.h" + +Battery::Battery() : Battery(0, "") {} + +Battery::Battery(unsigned short capacity, const char* batteryID) { + this->capacity = capacity; + this->batteryID = batteryID; +} + +std::ostream& operator<<(std::ostream& ostr, const Battery& bat) { + return ostr << "(" << bat. +} |
