Step 3: Part C

iLab Part C: Payroll Program
Step 1: Create a New Project
Create a new project and name it LAB1C. Make sure you close your previous program by clicking File >> Close Solution.
This time, do not delete the code that gets automatically created. Instead, insert your code right between the curly braces, as illustrated below.

static void Main(string [] Args)
{
// your code goes here!
}

Include a comment box like what you coded in Part B. This can go at the very top of your program.

You will write a program that calculates and displays the take-home pay for a commissioned sales employee along with all of the deductions based on the Processing Logic provided in Step 2.

Step 2: Processing Logic

Input: Prompt the user for the weekly sales
Process: Perform the calculations. The employee receives 7% of her total sales as her gross pay. Her federal tax rate is 18%. She contributes 10% to her retirement program and 6% to Social Security.
Output: Display the results
Sample Output from Lab 1:
Enter Weekly Sales: 28000
Total Sales: $28,000.00
Gross pay (7%): $1,960.00
Federal tax paid: $352.80
Social security paid: $117.60
Retirement contribution: $196.00
Total deductions: $666.40

Take home pay: $1,293.60
Press any key to continue . . .
Flowchart:



Pseudo Code:

1. Declare variables
2. Accept Input – weeklySales
3. Calculate Gross Pay = Weekly Sales * .07
4. Calculate Federal Tax = Gross Pay * .18
5. Calculate Social Security = Gross Pay * .06
6. Calculate Retirement = Gross Pay * .1
7. Calculate Total Deductions = Federal Tax + Social Security + Retirement
8. Calculate Total Take Home Pay = Gross Pay – Total Deductions
9. Display the following on separate lines and format variables with $ and decimal
a. Total Sales Amount: value of weekly sales
b. Gross Pay (.07): value of gross pay
c. Federal Tax paid (.18): value of federal tax
d. Social Security paid (.06): value of social security
e. Retirement contribution (.1): value of retirement
f. Total Deductions: value of total deductions
g. Take Home Pay: value of take home pay

Step 3: Save program
Save your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Save button on the toolbar, or Ctrl + S.

Step 4: Build Solution
To compile the program, click Build on the menu bar and then click the Build Solution or Build LabC option. You should receive no error messages. If you see some error messages, check the code above to make sure you didn’t key in something wrong. Once you make your corrections to the code, go ahead and click Build >> Build Solution again.

Step 5: Execute the program
Once you have no syntax errors, to execute or run your program, click Debug on the menu bar, and then click Start Without Debugging.

Step 6: Capture the output

1. Capture a screen print of your output [Do a PRINT SCREEN and paste into an MS Word document].
2. Copy your code and Paste it into the same MS Word document that contains the screen print of your output.
3. Save the Word Document as CIS170A_Lab01_C_LastName_FirstInitial
End of PART C
END OF LAB

To complete Step 3: Part C, you need to create a new project and name it "LAB1C". Follow the instructions below:

1. Close your previous program by clicking "File" >> "Close Solution".
2. Create a new project by clicking "File" >> "New" >> "Project".
3. Select a suitable application project template (e.g. Console Application) and click "Next".
4. Name the project as "LAB1C" and choose the desired location to save the project. Then click "Create".
5. In the Solution Explorer window, open the "Program.cs" file located under "LAB1C" project.
6. Between the curly braces of the "Main" method, insert your code for the payroll program.

Here is an example of how your code should look:

```csharp
using System;

namespace LAB1C
{
class Program
{
static void Main(string[] args)
{
// your code goes here!
}
}
}
```

Now that you have created the project and added the code, you can proceed to implement the program logic in the following steps.

To complete this task and create the desired Payroll Program, follow these steps:

Step 1: Create a New Project
- Open your development environment and create a new project.
- Name the project "LAB1C".
- Make sure to close any previous programs by clicking File >> Close Solution.

Step 2: Insert Code
- Within the new project, locate the automatically generated code.
- Insert your code between the curly braces as shown in the example below:

static void Main(string[] Args)
{
// your code goes here!
}

- Include a comment box at the very top of your program, similar to what you did in Part B.

Step 3: Write the Program Code
- Declare the necessary variables.
- Prompt the user for the weekly sales input.
- Calculate the appropriate values according to the provided processing logic.
- Store the results in the respective variables.
- Insert the necessary formatting to display the results correctly.

Step 4: Display the Output
- Display the output to the user by using print statements.
- Format the variables with a dollar sign symbol and decimal points as instructed in the example.

Step 5: Save the Program
- Save your program by clicking File on the menu bar and then clicking Save Program.cs, or using the Save button on the toolbar, or the keyboard shortcut Ctrl + S.

Step 6: Build the Solution
- To compile the program, click Build on the menu bar, then click Build Solution or Build LabC.
- Ensure that there are no error messages. If you encounter errors, review your code for any mistakes and make necessary corrections.
- Once you've resolved any errors, click Build >> Build Solution again.

Step 7: Execute the Program
- To run your program, click Debug on the menu bar, then click Start Without Debugging.

Step 8: Capture the Output
- Take a screen capture of your program's output by using the PRINT SCREEN key and pasting it into a blank MS Word document.
- Copy your code and paste it into the same MS Word document, below the screen capture.
- Save the Word document with a meaningful name, such as "CIS170A_Lab01_C_LastName_FirstInitial".

Congratulations! You have now completed Part C of the Payroll Program lab.