CIS 123 – COMPUTER PROGRAMMING II
Jacqueline Emslie, Instructor
ASSIGNMENT #1 – SALES CALCULATION
This assignment is worth 10 points towards your Programming Assignments grade.
PROJECT SPECIFICATIONS:
Given input, processing and output specifications, write a C# program to produce a sales
report. Be sure to plan the program FIRST using either pseudocode or flowcharts, but
whatever you use, please submit your work in a professional format.
INPUT:
The first input file is Clerks.txt, used to form the commission table, and
the record layout is as follows:
FIELD DESCRIPTION
LENGTH DATA TYPE
Clerk Number
Clerk Name
Commission-Percentage
9
16
2
Numeric
Alphanumeric
Numeric
The second input file is Trans.txt with the following layout:
DATA:
FIELD DESCRIPTION
LENGTH DATA TYPE
Clerk Number
Monthly Sales
Month
9
6
2
Numeric
Numeric
Alphanumeric
Both input files are available in the Assignment 1 folder in Blackboard.
PROCESS: 1) Read the 10 records in the Clerks.txt and put in an array.
2) For each of the remaining input records (transactions), find the
matching clerk number on the table. Calculate the commission
using the following formula:
Monthly sales
(transaction record
*
Commission Percentage
(built table)
Print out the detail line. See the Printer Spacing Chart.
3) Sort the table by clerk name and print the sorted table. (Bubble Sort)
20190809162356123_asgn_1_summer_version__1_
1
OUTPUT:
SALES REPORT
CLERK #
XXXXXXXXX
NAME
MONTH
XXXXXXXXXXXXXXXX
COMMISSION
XX
XXXXXX
COMMISSION TABLE
CLERK #
XXXXXXXXX
NAME
XXXXXXXXXXXXXXXX
PERCENTAGE
XX
REPORT FORMAT:
Please submit the following in the Student Drop Box by the due date:
1) Pseudocode or Flowchart – worth 2 points
– if pseudocode, make sure it is in a .txt format
– if flowchart, use a template or software
2) Program in .cs format – worth 5 points
3) output file in .txt format – worth 3 points
20190809162356123_asgn_1_summer_version__1_
2