Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

pseudocodes and looping

Posted on 2004-10-23
8
Medium Priority
?
629 Views
Last Modified: 2008-01-09
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?



0
Comment
Question by:jahsexy18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
8 Comments
 
LVL 3

Accepted Solution

by:
HendrikTYR earned 2000 total points
ID: 12389892
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
 

Author Comment

by:jahsexy18
ID: 12389976
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
 
LVL 3

Expert Comment

by:HendrikTYR
ID: 12390018
Our definitions of "pseudocode" might be a bit different:

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

Good luck
Hendrik
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jahsexy18
ID: 12390047
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
 
LVL 5

Expert Comment

by:basiclife
ID: 12391379
Seems fairly complete at a glance. I'm guessing you're going with C++ ?
0
 
LVL 5

Expert Comment

by:basiclife
ID: 12584827
Sounds good to me
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question