Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using 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
Using 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.
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
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