I have done very well so far in my class, but this question has me stumped. let me give you the basics. i am a supervisor in a manufacturing company, and i want to know which employees have increased their production this year over last year, so they can get a bonus. I designed the pseudo code for this as part A, not sure if right , but i did.
part B wanted me to pseudocde the same thing with this information
1000 units or fewer bonus is 25 bucks
1001-3000 (50 bucks)
3001-6000 (100 bucks)
6001 or higher (200 bucks)
i did this, again, not sure if right but i did it.
Thirdly and the one i am totally stumped on......wants me to modify question B to reflect these new facts.
( 30% of employees have greater production this year than last year)
(60% of employees produce over 6000 units/yr, 20% produce 3001-6000, 15% produce 1001-3000, and only 5% fewer than 1001.
I have no idea how to pseudocode out percentages..please anyone help me or give me a link or something..... thanks , im not looking for my homework answers, just a little insight to help me get over the hump
This is probally totally wrong, its what i came up with for the part B.... as you can tell im new and not getting a good hang yet...
Start
String name
Num ITEMSSOLD1 = 1000
NUM ITEMSSOLD2 = 1001-3000
NUM ITEMSSOLD3 = 3001-6000
NUM ITEMSSOLD4 = 6001
Get name, employee
If employee < = ITEMSSOLD1 then
Bonus = 25
Else
If employee = ITEMSSOLD2 then
Bonus = 50
Else
If employee = ITEMSOLD3 then
Bonus = 100
If employee >= ITEMSSOLD4 then
Bonus = 200
End if
End if
End if
By the way, psuedo code is supposed to be written in a natural language at the highest level. You should not be mentioning variable declarations. This is not psuedo code at all.