944,028 Members | Top Members by Rank

Ad:
Oct 19th, 2009
0

Need help with Pseudocode!!

Expand Post »
I am confused by the question and having trouble designing the logic(pseudocode) for this problem, any help would be beneficial and appreciated..

Heartland Community College has a file of student records sorted by the hour of the student's first class on Mondays this semester. The hour of the first class is a two-digit number based on a 24-hour clock (for example, a 1pm class is recorded as 13). Besides the hour, each record contains the student's name and town of residence. Create the logic to produce a report that students can use to organize carpools. The report lists the names and phone numbers of students from the city of Huntley.(Note that some students come from cities other than Huntley; these students should not be listed on the report.) Start a new group for each hour of the day, including the hour in a header that precedes the group.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
2fac323 is offline Offline
26 posts
since Jul 2008
Oct 20th, 2009
0
Re: Need help with Pseudocode!!
You could either sort the students into corresponding times before you start ( a little faster )

or iterate through the array of students 24 times, checking the time each time.

You want to sort the students into there corresponding times
so create arrays of students[24][MAX_STUDENTS]
Then iterate all students and then put each into there corresponding hours.

then you want to iterate through the times in the array 0 - 23 
 print the time index +1 
 then iterate through each student in that array (until no more students  are left )
 and print the name
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Oct 28th, 2009
0
Re: Need help with Pseudocode!!
You can create an array of structs that can hold those three pieces of data. Afterwards, sorting based on the hours can be done, starting with those from hour 0 - 23.
Reputation Points: 34
Solved Threads: 16
Junior Poster
Chilton is offline Offline
106 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: LC-3 Palindrome Help
Next Thread in Computer Science Forum Timeline: A question about algorithm





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC