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, 22.06.2019 00:00
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Me dangers of social media and the internetexplain what each means: 1) social media and phones have become an addiction.2) outside people have access to you all the time.3) cyberstalking4) cyberbullying5) catphishing6) viruses7) identity theft8) credit card fraud9) hacking10) money schemes
Answers: 1
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
question
Mathematics, 19.12.2021 01:10
question
Mathematics, 19.12.2021 01:20
question
Mathematics, 19.12.2021 01:20
Questions on the website: 13722361