pseudocodes and looping

I was wandering how to go about writing a pseudocoe if I had a file containing the grades of students from a beginners class, along with the students’ information. I want this  program  to loop through the records, and make sure that any student who has received 'D’, ‘W’, ‘I’, or ‘F’ in the course will not be able to move on to the Advanced .  How will I go about doing this?



jahsexy18Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
HendrikTYRConnect With a Mentor Commented:
Hope this is not homework:

"and make sure that any student who has received 'D’, ‘W’, ‘I’, or ‘F’ in the course will not be able to move on to the Advanced .  "
...so I guess you can just delete the poor suckers from the file :)
... or if you want to create a file with students who should be allowed then here's your pseudocode:

open input file for reading
open output file for writing

for each record from input file do
    if mark is not in ('D', 'W', 'I', 'F') then write record to output file
move to next record in input file

close output file
close input file
0
 
jahsexy18Author Commented:
Not exactly what

I was thinnking:Big Picture FlowStart
Start
Perform Housekeeping While not EOF Perform scheduleNextClass Endwhile Perform
StartCleanupStopHouseKeeping() begProgClass_Rec
 Char stuLastName
Char stuFirstName
Char Grade

 Open begProgClass_Rec Read begProgClass_RecReturnscheduleNextClass() If Grade = ‘A’ OR Grade = ‘B’ OR Grade = ‘C’ Then print ‘Advanced Programming’ Else print ‘Beginning Programming’ Endif Read begProgClass_RecReturnCleanup() Close begProgClass_recReturn
0
 
HendrikTYRCommented:
Our definitions of "pseudocode" might be a bit different:

http://www.webopedia.com/TERM/P/pseudocode.html

Good luck
Hendrik
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jahsexy18Author Commented:
actually this is what I meant, if anyone can assist with writting htis program in a more convienient way
start
    Perform Housekeeping
   While not EOF
        Perform scheduleNextClass
    Endwhile Perform Cleanup
Stop
HouseKeeping()
    begProgClass_Rec
   "declare variables
   Char stuLastName
   Char stuFirstName
   Char Grade
   Open begClass_Rec
   Read begClass_Rec
Return
scheduleNextClass()
    If Grade = A,B,C Then
    print Advanced Programming
    Else print Beginning Programming
    Endif
    Read begProgClass_Rec
Return
Cleanup()
     Close begProgClass_rec
Return
0
 
basiclifeCommented:
Seems fairly complete at a glance. I'm guessing you're going with C++ ?
0
 
basiclifeCommented:
Sounds good to me
0
All Courses

From novice to tech pro — start learning today.