Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need c++ code for my assignment. Please give all code. For this project you have been asked to write a program for a local store
Need c++ code for my assignment. Please give all code. For this project you have been asked to write a program for a local store owner. The store owner wants to keep a record of the name of his customers as well as the money they spend at each visit. Your program will dynamically allocate two arrays one to store the names and another one to store the amount of the purchase. The size of both arrays will be dynamically determined from the value entered by the user. Your program should allow the user to enter name-purchase pairs. For each customer entered to the store, the user types the customer's name followed by the customer's purchase amount. After the user enters all the customers, your program should display the list of all customers with their purchase amount. You will also need to createa function to calculate the average of the purchases by all the customers. te: Use pointer notation gather than array notation. Also make use of the new operator to dynamically allcate memory Input validation: don't accept negative amount and empty strings (e.g., . Both display and calculate should be methods. To help you out, here are their prototypes: void display(int*, int*, int); int calculate(int*, int)
Need c++ code for my assignment.
Please give all code.
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