Answered step by step
Verified Expert Solution
Link Copied!

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. image text in transcribed
image text in transcribed
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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions