diff options
sem 12
1 files changed, 27 insertions, 0 deletions
| -rw-r--r-- | Sem. 12/task1/Drinks/Drink.h | 27 |
diff --git a/Sem. 12/task1/Drinks/Drink.h b/Sem. 12/task1/Drinks/Drink.h new file mode 100644 index 0000000..d4d37ae --- /dev/null +++ b/Sem. 12/task1/Drinks/Drink.h @@ -0,0 +1,27 @@ +#pragma once + +class Drink +{ +public: + Drink(); + + Drink(const char* name, int ml); + + Drink(const Drink& other); + Drink& operator=(const Drink& other); + ~Drink(); + + const char* getName() const; + int getMl() const; + + void setName(const char* name); + void setMl(int ml); + +private: + char* name; + int ml; + + void copyFrom(const Drink& other); + void free(); + +};
\ No newline at end of file |
