computer science

posted by .

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

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. IT

    In this assignment, you are going to be gathering information about the future students of NSU at one of our open houses. Since there will be plenty of student candidates with interests on different programs, I would like you to create …
  2. computer

    Create a new project Lab05e, and write a program that asks the user to enter a line. The program must find the one or more words between quotation marks (“”) characters and print them as follows: Please enter a line: She “does …
  3. UOP

    The final project for HSM 240 is a 1,750- to 2,100-word proposal paper on a social program that you create. Pretend that you have the power and capacity to create an agency or organization and decide to create a new social program. …
  4. Programming

    Write a program to do the following: In main, declare a Player Name Array and a Score Array. Declare the size of the arrays to be 100. In the InputData( ) method, input the player name and score into the arrays for an unknown number …
  5. Computer

    After writing the program of Exercise 17.7, write a simple program to create some test data for checking out the program. Use the following sample account data: Master file Account number Name Balance 100 Alan Jones 348.17 300 Mary …
  6. VB

    I am new here; say to everyone first. Here is the a question for coding list box; it has two part: first part: Create a project that stores personal information for a little electronic "black book"; the fields in the file should include …
  7. computer science

    How can i create my computer science project which is to draw a game and make a file on your game which you can create?
  8. Computer science

    As a member of the Information Security team at a small college, you have been made the project manager to install an access control system (ACS) in a dormitory. The ACS will automatically unlock the dormitory doors via an electronic …
  9. bookkeeping

    Using your computer, you create a file for an existing costumer. When you're finished, you should a. overwrite the existing file by giving the new file the same name. b. use Save as to save the new file under a different name c. coordinate …
  10. offfice finaces

    Using your computer software, you create a new file for an existing customer. When you're finished, you should A. coordinate the old and new files by giving both the same name. B. overwrite the existing file by giving the new file …

More Similar Questions