Question: Sample Output This code is to be written in C++ Requirement: Update your store program to use modular programming Additionally, use a global variable to

Sample Output


This code is to be written in C++
Requirement: Update your store program to use modular programming Additionally, use a global variable to store your user's currency so that you may access and modify it anywhere in your program Updated Specifications 1. The program will print your info and a message that describes its mission. (Must use the function you created in Lab04) 2. Customer is asked how much currency they have available which is stored to a global variable and displayed when they purchase. 3. Program explains how all shops are closed other than the one you create 4. Program asks if the customer (the user) wants to enter the open shop. (If they don't, the program exits.) 5. Program introduces the shop and displays the available items and how much each costs (Minimum of 4 items 6. Customer is asked to pick an item from the list to purchase. If the customer picks an item not on the list, they are told that item doesn't exist or is no longer available and are asked to try again. Additionally, a final option under available items is available to exit the store 7. If the customer has enough currency, the item's cost is deducted from their total currency and the purchased item is removed from the available items. Ifthe customer doesn't have enough currency, they are told to try another item 8. Program then outputs the item which was purchased and the remaining currency the customer has left. After a purchase is made, they are shown the new list of items available (with the one they bought no longer available to buy more. If all items have been purchased, the store closes Design tips: Find pieces/chunks of your code with repeating patterns' which can be converted into void functions. See the pre-lab for a good example. Implementation Hints: A double colon before a variable name will access the global variable with that name 1.e. currency Pieces of your program such as listing items or responding to an item purchase are good candidates for void functions To receive full marks with a working solution Ensure you did not repeat bad-practice mistakes based on feedback from previous l Use the program header function you created in Lab04 Program must use at least one global variable Program must have at least two useful functions (Header function does not count) o useful means you can't just make some void function that prints "Welcome to my store" and call it a day... It also means that these functions must shorten the overall
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
