A restaurant serves five different kinds of sandwiches.
Implement a class Sandwich that includes the following private data members:
1. char *name – a sting to store the sandwich name
2. char *filling – sandwich filling
3. char *size – size of the sandwich (can only be small, medium or large)
4. bool is_ready – sandwich, is it ready or not
5. double price - price of the sandwich.
The class shall provide the following public methods:
1. Sandwich() – a default constructor
2. Sandwich(char *fillingVal, double priceVal) – a parametrized constructor
3. Sandwich(char *fillingVal, double priceVal, char* nameVal, char* sizeVal, bool
ready_status)
4. Sandwich(const Sandwich &sandwich)
5. void setFilling(char *fillingVal)
6. void setPrice(double priceVal)
7. void setName(char *nameVal)
8. void setSize(char *sizeVal)
9. char* getFilling()
10. double getPrice()
11. char* getName()
12. char* getSize()
13. void makeSandwich()
14. bool check_status()
Comments
Leave a comment