From 26cf424c42f9cdc172191faa5b2d1c1fcf350143 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 19 Apr 2022 21:04:23 +0300 Subject: Added work from todays practice --- .../09-Practice-19.04.2022/Order.h | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Year 1/Object-oriented Programming/09-Practice-19.04.2022/Order.h (limited to 'Year 1/Object-oriented Programming/09-Practice-19.04.2022/Order.h') 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; +}; -- cgit v1.3.1-26-gb76a