Question
Develop the design (use the design guide as a template) and code for each of the following in C++. Program #2 A supermarket wants to
Develop the design (use the design guide as a template) and code for each of the following in C++.
Program #2
A supermarket wants to reward its best customer each day, showing the customers name on a screen in the supermarket. For that purpose, the customers purchase amount is stored in an array and the customers name is stored in a corresponding array.
Write a program that prompts the cashier to enter all prices and names, then adds them to two arrays, calls the function that you implemented, and displays the result. Use a price of 0 as a sentinel.
Each program should include COMMENTS (internal), and structured (functions). Each function should indicate who completed the design and code, or sections of the code.
Modify each of the programs to include an example of the following:
Wide Strings
String handling functions
Code Injection
Buffer Overflows
Off-by-One Errors
Step 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