Question
You customer owns a used car lot and wants a program to calculate commissions for the sales force. The input file contains one line for
- You customer owns a used car lot and wants a program to calculate commissions for the sales force. The input file contains one line for each sale that consists of the following:
SID (Salespersons ID)
VID (Vehicle ID)
BPrice (Book Price, Target price for selling the vehicle)
SPrice (Sales Price, Actual price the vehicle is sold for)
A typical set of data in the input file would look like this:
SID | VID | BPrice | SPrice |
1258 | 125 | 35000 | 37500 |
4389 | 215 | 31000 | 31000 |
4389 | 309 | 27500 | 26000 |
Output will be a file which contains the Sales ID and the Commission amount due.
The salesperson can earn the following commissions:
Below the Book Price 1% of the Sales Price
Equal to the Book Price 2% of the Sales Price
Above the Book Price 2% of the Book Price + 10% of the amount above the Book Price
If they sell 3 or more vehicles they also get 1% of the entire amount sold
For example:
If one salesperson sold all of the vehicles listed above.
BPrice | SPrice | Commission | |
35000 | 37500 | 2% + 10% above book, 750+250 | 1000 |
31000 | 31000 | 2% | 620 |
27500 | 26000 | 1% | 260 |
Sold 3 or more, 1% of total (375+310+260) | 945 | ||
Total | 2825 |
Design a flow chart to display the necessary programming logic that is a structure and Object-oriented design Programming Language.
Use the flowchart to build detailed pseudocode that can be used to develop this program.
Design a test plan and display the results. Did you have to rework the logic after the first test?
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