Chapter 7: An Example
Suppose that the company is going to institute a new sales commission plan for its sales reps. Commission will be based on product category and month-to-date sales by the rep. You have to provide the costs of the new plan based on one month’s transactions. You might write out the problem as follows:
For each transaction, you need the following information:
• Get the current month-to-date sales for the rep.
• Determine the appropriate commission factor.
• Calculate the commission for this transaction.
• Update the rep’s month-to-date sales.
You write a skeleton DS2 program to implement: ...