subject

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 create a function to calculate the average of the purchases by all the customers. Note: Use pointer notation rather than array notation. Also make use of the newoperator to dynamically allocate memory. Input validation: don’t accept negative amount and empty strings (e. g., "", " ").Both display and calculate should be functions. To help you out, here are their prototypes:void display(string*, double*, int); double calculate(double*, int); void sort(string*, double*, int);Check the PA4_Demo video to see a sample runof the program

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
Write a loop that prints each country's population in country_pop. sample output for the given program with input 'china: 1365830000,india: 1247220000,united states: 318463000,indonesia: 252164800': united states has 318463000 people. india has 1247220000 people. indonesia has 252164800 people. china has 1365830000 people.
Answers: 2
question
Computers and Technology, 22.06.2019 22:50
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Write an assembly language program to input a string from the user. your program should do these two things: 1. count and display the number of words in the user input string. 2. flip the case of each character from upper to lower or lower to upper. for example if the user types in: "hello there. how are you? " your output should be: the number of words in the input string is: 5 the output string is : hello there. how are you?
Answers: 2
You know the right answer?
For this project you have been asked to write a program for a local store owner. The store owner wan...
Questions
Questions on the website: 13722362