HP3000-L Archives

May 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Klein <[log in to unmask]>
Reply To:
Date:
Tue, 11 May 1999 09:57:21 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
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.

ATOM RSS1 RSS2