Menu

Question 3 Referring Question 2 Write Program Another File Named Themaincpp Order Execute Q43824539

Question 3 Referring to Question 2, write a program in another file named themain.cpp in order to execute the classes created
C++Question 3 Referring to Question 2, write a program in another file named themain.cpp in order to execute the classes created in Question 2. The program should prompt users to input the type of food (roti canai or nasi goreng) before proceeding to asking for each order’s first name, last name, and number of orders. Your program will iterate to reserve the orders until character “N” or “n” is keyed in as a sentinel value to stop the program. Your main() function should contain the following elements. belumMakan *t (50); *+50) is a class belumMakan pointer array that instantiate list of objects from both class rotiCanai and class nasi Goreng. Sufficient variables to preliminary store values for first name, last name, number of orders, food type, loop counters and sentinel value. Variable type is used for food type selection. If type == 1, an object pointer for class rotiCanai is created, while if type == 2, an object pointer for class nasi Goreng is created. You may use any preferred selection structure. Member function displayOrder () will be called before the end of each loop. Refer to Figure 14 for the final output. Show transcribed image text Question 3 Referring to Question 2, write a program in another file named themain.cpp in order to execute the classes created in Question 2. The program should prompt users to input the type of food (roti canai or nasi goreng) before proceeding to asking for each order’s first name, last name, and number of orders. Your program will iterate to reserve the orders until character “N” or “n” is keyed in as a sentinel value to stop the program. Your main() function should contain the following elements. belumMakan *t (50); *+50) is a class belumMakan pointer array that instantiate list of objects from both class rotiCanai and class nasi Goreng. Sufficient variables to preliminary store values for first name, last name, number of orders, food type, loop counters and sentinel value. Variable type is used for food type selection. If type == 1, an object pointer for class rotiCanai is created, while if type == 2, an object pointer for class nasi Goreng is created. You may use any preferred selection structure. Member function displayOrder () will be called before the end of each loop. Refer to Figure 14 for the final output.

Expert Answer


Answer to Question 3 Referring to Question 2, write a program in another file named themain.cpp in order to execute the classes cr…

OR