Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions