QUOTE(baavgai @ 14 Oct, 2008 - 01:05 PM)

Create a structure or class to hold the information you need. ( Not knowing what language you intend to use, it's hard to be specific. )
cpp
typedef struct {
int studentId;
int classroom;
double score;
} TestData;
Create an array of that type, or vector, or ArrayList. Collect the data. Then just write some functions to derive the information you need. You could write a loop that adds up all the scores for classroom X. Another that counts the current number of students, to validate the input data, etc.
There are more complex and possibly efficient ways to do this, but this approach would meet your requirements with minimal fuss.
Hope this helps.
Well the class is programming language so we arent working with any code yet. It is called pseudocode. The point is to just get the logic out. I looked at what you did and I don't understand it. We haven't working with structures unless a structure is an array. Basicaly its like flow charting with words that's what pseudocode is.
I haven't been able to get any further my self. just to show what we do looks like here is an example.
CODE
Part A)
start
string idNumber
string firstName
string lastName
string major
num gpa
string HEADING="Students whoe G.P.A. is below 2.0"
string HEADING2="ID First Names Last Names Major G.P.A."
print HEADING
print HEADING2
if gpa < then 2.0
print idNumber, firstNames, lastNames, major, gpa
stop
Part B)
start
string idNumber
string firstName
string lastName
string major
num gpa
string HEADING="Students whoe G.P.A. is below 2.0"
string HEADING2="ID First Names Last Names Major G.P.A."
string FOOTER="END OF FILE"
print HEADING
print HEADING2
get idNumber, firstNames, lastName, major, gpa
while not eof
if gpa < 2.0 then
print idNumber, firstNames, lastNames, major, gpa
else
get idNumber, firstName, lastName, major, gpa
endwhile
print FOOTER
stop
Part C)
start
string idNumber
string firstName
string lastName
string major
num gpa
string HEADING=" Literary Honor Society"
string HEADING2="Students whose major is English and G.P.A. is 3.5 or higher"
string HEADING3="ID First Names Last Names Major G.P.A."
print HEADING
print HEADING2
print HEADING3
get idNumber, firstNames, lastName, major, gpa
if major=english and gpa > 3.4 then
print idNumber, firstNames, lastNames, major, gpa
else
get idNumber, firstName, lastName, major, gpa
stop
I really appreciate any help with this. I am really stuck...and I think its probably something stupid I am getting confused about.