Question: Create .h and .cpp files with constructors, accessors, and mutators for another assignment. In another assignment, you need to create Restaurant, Menu and Pizza classes
Create .h and .cpp files with constructors, accessors, and mutators for another assignment.
In another assignment, you need to create Restaurant, Menu and Pizza classes and employee and hour structs. Create the .h and .cpp files for each of the classes with the appropriate members (all being private), mutator functions, accessor functions, and constructors.
For example, here are some prototypes for the default constructor, mutators, accessors for the Pizza class to get you started.
Pizza(); void set_name(string name); string get_name(); void set_num_ingredients(int num); int get_num_ingredients(); void set_from_file();
You can also use this opportunity to set up the functions which will read information from the files. It is not recommended that you do file I/O in your constructors as doing so may result in your object failing to be made.
Make sure you are using const in the appropriate places for all classes and create a Makefile that compiles all of your .cpp files and makes an executable.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
