Question: Please answer the following in C++. Add a function to both the Sale and Salesperson classes that returns the private salesperson ID number. Write a

Please answer the following in C++.

Add a function to both the Sale and Salesperson classes that returns the private salesperson ID number. Write a main()function that contains an array of five Salesperson objects and store appropriate data in it. Then, continue to prompt the user for Sale data until the user enters an appropriate sentinel value. For each Sale transaction entered, determine whether the salesperson's ID number is valid. Either display an error message, or use the friend display()function to display all the data.

Use the following for the ID and name:

103: Woods

104: Martin

105: Martin

106: Hansen

107: Davis

Please answer the following in C++. Add a function to both the

Add a function to both the Sale and Salesperson classes that returns the private salesperson ID number Write a main()function that contains an array of five Salesperson objects and store appropriate data in it. Then, continue to prompt the user for Sale data until the user enters an appropriate sentinel value. For each Sale transaction entered, determine whether the salesperson's ID number is valid. Either display an error message, or use the friend display()function to display all the data Use the following for the ID and name 103: Woods . 104: Martin . 105: Martin . 106: Hansen . 107: Davis Sample Run Enter salesperson ID or 0 to quit 103 Enter month of sale 2 Enter day 12 Enter year 2016 Enter amount of sale 1000 Sale #103 on 2/12/2016 for $1000 sold by #103 Woods Enter salesperson ID or 0 to quit 106 Enter month of sale 11 Enter day 25 Enter year 2016 Enter amount of sale 500 Sale #106 on 11/25/2016 for $500 sold by #106 Hansen Enter salesperson ID or 0 to quit 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!