Fuck Pseudocode

Billek

Active member
I have this assignment due for my computer class and any help/tips I can get on it would be much appreciated.

CSI 101 Fall 2008Prof Robert Ekblaw HomeworkAssignment #3 Due: Wednesday,Sept 24th at 5:45PM Description Write pseudocode to design the following process:Open the file named “employees”. The file starts with the count of employeerecords, then it has the records themselves. Each employee record looks like this:1. ID 2. Last name3. First name4. Date of birth5. Date of hire6. Manager's ID7. Flag for full-time (Yes or No)8. Current pay ratePerform the following services on the file data:· Findthe employee with ID 0236781. Print theemployee's name and date of hire· Countthe number of employees working for Manager # 032485· Calculatethe percentage of part-time employeesUse variable to hold counts. I only want you passing through the employee file ONCE!Remember to close the file when you are done.You will graded on success (in other words, your programwould produce the correct output), proper flow, and proper syntax (whereapplicable).You may turn in the assignment on paper or e-mail it to csi101@cs.albany.edu.
 
haha, is this c++? Looks pretty simple and its just pseudo code, make it really brief like:

open file

while till file is done

read in words in order

store in class

close file stream

sort/search class for info

output

It would be hilarious if someone emailed your teacher this thread
 
It has to be like mid-low level coding. He said the best way to do it is using loops and shit...idk. Ill work on it tomorrow.
 
just set up a while loop (while (not at end of file)) and have some if-then statements:

if (id=#) get name and date of hire

if (manager = #) num_employees++

if (fulltime=yes) full_time++ else part_time++
 
Theres nothing wrong with asking for a little help, as long as I understand it at the end, and ^^ thanks, +k.
 
Definately a work in progress, I am going to go over it a bit with some classmates, later, but here is what I have so far.

Take into account, I hate this class, I hate any kind of code, and I have little idea of what im doing, so don't make fun of my shitty shit.

Michael Billek000936223BEGIN My ProgramSET Count A=0, Count B=0, OPEN “employees” FOR READDO WHILE (“employees” is being read) IFID# = “0236781” THEN PRINT employee’s full name and date of hire ELSEcontinue reading from “employees” ENDIF IFManager’s ID# = “032485” THEN +1 to Count A ELSEcontinue reading from “employees” ENDIF IF“Flag for full time” = “no” THEN +1 to Count B ELSE continue reading from “employees” ENDIFENDWHILE DO READnumber FROM Count A IFCount A>0 THEN PRINT Count A ELSE ENDIF READnumber FROM Count B READemployee count FROM “employees” COMPUTECount B / Employee count * 100 and PRINT answerUNTIL both numbers have been printedCLOSE “employees”END
 
Back
Top