CPS120 Extra Credit Assignment

CPS120: Extra Credit Assignment

Worth Approximately 20 pts if all parts are completed satisfactorily. You will not be penalized by not doing the extra credit. Any attempt can only help your score, even if you do not complete all of the submission requirements detailed below.

Specifications:

  1. You have been hired by "Big Wheel Bob's Bicycle Shop" in Chicago, Illinois to create an output report showing each of bicycle salespeople's performance for the year 2002.
  2. The output is a formatted report that shows each salesperson's name, number, base salary, commission amount, and gross salary. There should be a single output line for each detail record. A line should be skipped between
  3. The overall headers and the column headings
  4. The column headers and the detail lines
  5. The last detail line and the end of report message
  6. Input consists of salesperson's records each containing a salesperson's name, number, annual base salary and yearly sales.
  7. If sales are greater than $10,000, then the commission rate is 10%. Otherwise, the commission rate is 5%.
  8. The gross salary is calculated by adding the base salary and the commission amount.
  9. The following is your data dictionary for this problem:

Name / Description / Type / Size
1 / salesPersonName / Salesperson's name / Non-numeric / 30 characters
2 / salesPersonNum / Salesperson's number / Integer / 6 digits
3 / baseSalary / Salesperson's annual salary / Real number / 9 w/ the point
4 / annualSales / Sales amount for 2002 / Real number / 10 w/ the point
5 / commAmt / Commission Amount / Real number / 9 w/ the point
6 / grossSalary / Salesperson's gross salary / Real number / 10 w/the point
7 / HI_COMM / High commission rate / Constant / 10 percent
8 / LO_COMM / Low commission rate / Constant / 5 percent
  1. The calculations required are
  2. commAmt = annualSales *HI_COMM or commAmt = annualSales *LO_COMM
  3. grossSalary = baseSalary + commAmt

Submission Requirements:

·  You must create a program flowchart for the program you are coding

·  You must write and submit the pseudocode you created before you begin to write the code.

·  You must create and submit a verifiable test plan for the program you are coding

·  You must choose the proper variable data types for your variables so that the final answer is accurate.

·  Your code must include commentary indicating how the program works.

·  Your code must include explanatory input prompt messages where appropriate so that the user knows exactly what to type as inputs.

·  Make sure that your answer is explained with a clearly worded, explanatory output message as well.

·  Present the final cost as a number rounded to the hundredth's place (e.g. $78.65) and include a dollar symbol. Make sure that trailing zeros do display (eg. $2.80 rather than $2.8; hint - use setprecision).

·  Save the source code file as "extra_credit.cpp". There should be no blank spaces and no # symbol in the filename.

·  Compile your source code and save the file as extra_credit.cpp

Assumptions:

·  Input will be in the form of a sequential file called salary_data.txt. It containing at least 10 and no more than 100 records. These records will contain a salesperson's name (30 characters), number (6 digits), yearly base salary (in dollars and cents with six digits to the left of the decimal point) and annual sales amount (in dollars and cents with seven digits to the left of the decimal point).

·  The input file will be downloadable

·  The input file will contain a proper EOF record after the last complete record.

·  Base salaries that are negative or greater than $100,000 are invalid.

·  Sales amounts greater than $1,000,000 dollars are invalid.

·  You can output the report created from your program to the screen. It should, however, be properly formatted and have proper headings. You should list each person, their employee number, their base salary, their commission amount, and their gross salary.

·  You do not need to create any totals for the columns

·  The output need not be sorted

·  The actual data file will be available at least 10 days before the program is due

Logistics:

  1. You must hand in the following on separate pages stapled in this specified order:
  1. A program flowchart created in using flowcharting software, MS Powerpoint or MS Word.
  2. Typed pseudocode that you used to plan out your C++ code.
  3. A typed test plan that you developed.
  4. Make sure that you use this test plan to test your program before submitting it
  5. Hardcopy source code for this assignment.
  6. A print out of the output report that you have created by running your application. A screen print is acceptable for this.
  7. Staple multiple pages together, if applicable.
  8. The source file saved on a floppy disk or attached to an email as extra_credit.cpp.
  9. The executable file from this application saved on a floppy disk or attached to an email as extra_credit.exe.

extra_credit Created on 11/20/2002 Page 1 of 3