Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is to be coded using c++ and must meet all program requirements to be considered fully functional. E.2. Question 2: Improving the Text-based RPG
This is to be coded using c++ and must meet all program requirements to be considered fully functional.
E.2. Question 2: Improving the Text-based RPG Vendor (40 Marks) Requirement Update your store program from Lab05 to utilize arrays. Even though only one usage of passing an array to a function is required, please do your best to use arrays throughout your program. This will greatly help you understand arrays and improve your awesome store! 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 6 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. If the customer doesn't have enough currency, they are told to try another item. (Remember: modifying an array that has been passed to a function will modify the array in your main 0 code. Use this feature of arrays and functions to track if the item's been purchased or not 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 in the list at all. i.e. does not print "no longer available" and instead completely disappears see updated sample output) to buy more. If all items have been purchased, the store closesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started