Subject: | |
From: | |
Reply To: | |
Date: | Tue, 11 May 1999 09:57:21 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Efren Castro wrote:
>
> Hi everyone,
> I am currently working on a BONUS program in COBOL. I
> need some kind of formula to figure out my problem, but
> I just cant figure it out. Maybe some of you can come
> up with something. Heres the problem.
>
> Minimum to be given = $500.00
> Maximum to be given = $1500.00
> Total Budget = $75,000.00
> Total Employees = about 80
>
> Any employee who misses over 160 will not qualify for
> bonus. any help will be appreciated.
And Roy "Buz" answered:
>What are the criteria for the bonus? Are you trying to
>give it equally, or give extra to people who have worked
>overtime. Is the "missed over 160" 160 hours of work or
>160 meetings? Simplest formula would be:
>$75,000/80 = $937.50
And another alternative (in pseudocode):
pool = 75000
repeat
bonus = (employee.salary / total_salaries) * pool
if (bonus < 500) bonus = 500
else if (bonux > 1500) bonus = 1500
if (missed 160) bonus = 0
pool = pool - bonus
next employee
until done
This isn't completely correct and could result in some
inequities because of the limits (it would be possible
for two people with the same salary to receive different
bonus, depending on where they fall in the allocation
routine because of the limitations). But, you get the
general idea, and the resolution to the above problem
can be handled by eliminating all employess that don't
qualify from processing and from the total_salaries
and to sort them by salary before processing.
|
|
|