CSIS 209 Programming Assignment 2



A large company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5,000 worth of merchandise in a week receives $200 plus 9% of $5,000, or a total of $650. You’ve been supplied with a list of the items sold by each salesperson. The values of these items are as follows:
Develop a C# application that inputs one salesperson’s items sold for the last week, then calculates and displays that salesperson’s earnings. There’s no limit to the number of items that can be sold by a salesperson. You do not have to implement this with classes and objects.
Technical Requirements:
Prompt the user to enter the salesperson’s name, and store this name in a variable.
Prompt the user to enter an item number and a quantity sold of that item. Store these two entries in two separate variables called “intItem” and “intQuantity”.
Using a DO-WHILE control structure, loop until the user enters -1 for the item number.
Calculate the amount of sales for an item and store the result in a variable called dblItemSales.
After the user enters an item number and a quantity, print to the screen: the salesperson’s name “has sold “ [intQuantity] “of item # [intItem].
Accumulate the total sales in a variable called dblTotalSales by using a SWITCH statement to select the correct value to be multiplied by the quantity sold and adding this result to a running total, which is stored in the variable dblTotalSales.
If the user enters a number other than 1, 2, 3, or 4, display the message “Invalid Entry” and re-prompt the user to enter an Item Number. Make sure you do not perform any calculations or prompt the user to enter a quantity if the item number is incorrect.
After accumulating the total sales for an employee (that is, after the user has entered a -1 to quit), print to the screen [Salesperson’s name] sold [number of items] of item # [ item number].
The solution includes a Visual Studio (c#) project
Attachments [Move over files to preview content of those files] (105.73 KB)
Visual Studio project
Preview Program.cs
xxxxxx xxxx xxxx(xxxxxx[] xxxx)
xxxxxx[] xxxxx = { 239.99, 129.75, 99.95, 350.89 };
xxxxxxx.xxxxx(“xxxxx x xxxxxxxxxxx’x xxxx: “);
string salesperson = Console.ReadLine(); // input salesperson’s name Console.WriteLine(); double dblTotalSales = 0; bool stop = false; while (!stop) { int intItem = 0; int intQuantity = 0; bool validate = false; while (!validate) { try
xxxxxxx.xxxxx(“xxxxx xx xxxx xxxxxx xxxxxxx 1 xxx 4 xx -1 xx xxxx: “);
xxxxxxx = xxx.xxxxx(xxxxxxx.xxxxxxxx()); // xxx xxxx xxxxxx
xx (1 <= xxxxxxx && xxxxxxx <= 4) { xxxxxxxx = xxxx; Price: $15 Buy Now Checkout Added to cart Buy More Save More Buy at least TWO items & save up to 30% OFF your ENTIRE order! Rack up instant rebates in your shopping cart. Simply add items to your cart, and see the savings add up. Discounts will automatically be applied on eligible orders. CSIS 209 Programming Assignment 2 – $15.00 CSIS 209 Programming Assignment 3 – $15.00 CSIS 209 Programming Assignment 4 – $19.00 CSIS 209 Programming Assignment 5 – $19.00 CSIS 209 Programming Assignment 6 – $19.00 CSIS 209 Programming Assignment 7 – $19.00 CSIS 209 Programming Assignment 8 – $25.00 Add to Cart Checkout Added to cart You May Also Like: CSIS 209 Programming Assignment 1 CSIS 209 Programming Assignment 3 CSIS 209 Programming Assignment 4 CSIS 209 Programming Assignment 5 CSIS 209 Programming Assignment 6 CSIS 209 Programming Assignment 7 CSIS 209 Programming Assignment 8


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.