diff options
Added work from todays practice
1 files changed, 29 insertions, 0 deletions
| -rw-r--r-- | Year 1/Object-oriented Programming/09-Practice-19.04.2022/Order.h | 29 |
diff --git a/Year 1/Object-oriented Programming/09-Practice-19.04.2022/Order.h b/Year 1/Object-oriented Programming/09-Practice-19.04.2022/Order.h new file mode 100644 index 0000000..d044c2d --- /dev/null +++ b/Year 1/Object-oriented Programming/09-Practice-19.04.2022/Order.h @@ -0,0 +1,29 @@ +#include "Product.h" + +class Order { + char restaurantName[25]; + Product* products; + int productCount; + + void free(); + void copyFrom(const Order& other); + + void move(Order&& other); + +public: + Order(const char* restaurant); + + ~Order(); + Order(const Order& other); + Order& operator=(const Order& other); + + Order(Order&& other); + Order& operator=(Order&& other); + + + void addProduct(const Product& product); + + const char* get_restaurantName() const; + int get_productCount() const; + const Product* get_products() const; +}; |
