Post a New Question

programming

posted by .

write a program in C# that calculates and prints the take home pay for a commissioned sales employee. allow the user to enter values for the name of the employee and the sales amount for the week. employee receives 7% of the total sales. federal tax rate is 18%. retirement contribution is 10%. social security is 6%. use appropriate constants. design an object oriented solution and write constructors. include at least one mutator and one accessor mathod; provide properties for the other instance variables.

  • programming -

    There can be many ways to approach the problem, but it would be obvious that you'll need to create a class.

    The instance variables will contain the employee's name, and the weekly sales.

    The constants (7%, 18%, 10%, 6%, etc.) could be a static constant, since every employee uses the same values. By setting it as a static constant, you will avoid multiple copies when new instances are created, also it is easier to edit if these rates change.

    A mutator is a method that modifies the value of an instance variable, say the weekly sales.
    An accessor is method that returns the value of a given instance variable.

    In general, you would have a method for data entry for the employee, and all data would be written through the constructor. Instance variables should be private, so any access should be done through an accessor.

    You'd have another method to print the calculations or the "pay slip", whichever way you prefer.

    If you come up with a pseudocode, feel free to post it for comments. However, we do not do the work for you, for the reason that solving the problem is a cognitive process that helps you learn and retain what you learned, which you'll need for exams and more important, when you eventually get a job in the field.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. programming

    A small startup software developer company needs to create a program that will calculate the pay of its employees. For the first version of the program, the company wants the program to accept an employee’s name, the number of hours …
  2. programing

    A small startup software developer company needs to create a program that will calculate the pay of its employees. For the third version of the program, the company wants the program to accept an employee’s name, the number of hours …
  3. devry

    A small startup software developer company needs to create a program that will calculate the pay of its employees. For the third version of the program, the company wants the program to accept an employee’s name, the number of hours …
  4. computer Programming

    A small startup software developer company needs to create a program that will calculate the pay of its employees. For the third version of the program, the company wants the program to accept an employee’s name, the number of hours …
  5. computer programming

    small startup software developer company needs to create a program that will calculate the pay of its employees. For the third version of the program, the company wants the program to accept an employee’s name, the number of hours …
  6. programming

    write a payroll program that promt a user to enter his name,hourly rate,working hours in the week and display the amount earning by each employee in Rand.user is not allowed to enter any negative value for hourly rate and working hours.
  7. Programming with Eclipse

    Design, implement, test, and debug an application to compute an employee’s weekly pay. If the employee works more than 40 hours a week, the employee earns 1.5 times the basic hourly pay for any time worked over 40 hours. The program …
  8. programming

    Temp Employer wants a program that will allow the company’s clerk to enter an employee’s name and the number of hours the employee works every month. (The number of hours worked will always be an integer). The program will display …
  9. programming

    write a program that creates a list of employees objects of size n entered from user using list interface and a list class implementation and display all employees in list and print employee name with minimum salary and remove employee …
  10. java programming

    Create a Sales application that prompts the user for a series of sales figures and then implements a sorting routine on the sales figures. Output. Enter the number of sales made today: 15 Enter the amount of sales 1:25 Enter the amount …

More Similar Questions

Post a New Question