Skip to content

Help me.. C#.. I really don't know how to do this..

Amex Johnny

Amex Johnny

Asked Apr 16, 2015, 3:28 AM EDT2 answers
Share
LinkedInX
INSTRUCTIONS
-Use C#.Net 2010
-Write ONE program for that question.
-Use suitable labels for your output

1) A factory employs n=20 staff who are paid an hourly rate of $12.50. Their salaries are calculated as follows:



        salary        = hours * rate                           for hours between 0 and <=40
                        = 300 + (hours-40)*rate*1.5        for hours between >42 and <=60
                        = 525 + (hours-60)*rate*2.0        for hours >60

Write a program to generate a report that resembles the below.


                                                       PAYROLL REPORT        
        No.                Employee name                        Hours                       Salary($)
        1                    AAA                                       10                             75.00
        2                    BBB                                       45                             356.25
        3                    CCC                                       60                             675.00
        ....(Until 20)


                              Total salary = $....

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    You need to break the question down into smaller components. In this case, three main areas: an employee list, a salary calculator and a report grid.

    For each of the employees you will need to capture the employee id, name, hours worked and salary (calculated based on the rules given). The total salary is easily calculated from the list of employees after processing them.

    To generate the report, you'll need to feed the report grid with the employee list. You don't mention what platform or type of application, so I can't really help you with what the report grid would be. I would suggest you look into types of Data Grids available on whatever application type you are using. Most are as simple as binding the employee list to it and displaying it.
    +1
  • Amex Johnny
    0
    I just want a code.. please.. :'(
    0