Question: please explain as much as possible! intro to C++ part#1 Create a new data type, called grocery_item, to describe an item in a grocery store.
please explain as much as possible! intro to C++
part#1 Create a new data type, called grocery_item, to describe an item in a grocery store. Assume that each item in the store has the following characteristics: Name Price Category (produce product, milk product, meat product, and baked product). You may shorten the category names to produce, milk, meat, and bread. Use struct construct to describe grocery items and use enum construct to describe items category. For struct definition created in part #2 write the following two functions: Function that takes an argument of type grocery_item and displays its characteristics. Hint: Use switch statement to output items category. Function that asks user to input characteristics of the grocery item and returns inputted information as a variable of type grocery_item. Your function must validate the price of the grocery_item..
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
