lab19 - I would recommend doing this in two phases, as in...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 19: Traffic Analysis, Part 3 Last Modified 03/08/2009 Key Concepts: arrays, sorting arrays You may work with one partner on this lab. This lab builds on Lab 17 , which builds on Lab 9 . Pick one person's solution to Lab 17 to modify. First spend a few minutes resolving any differences between the two solutions and any errors from Lab 17. Your task is the use the pseudocode in the class notes for either the selection sort or the bubble sort to add sorting into your traffic data program to sort the speeds into ascending order. Your end goal is that the listing at the end of your program will have the speeds sorted. (The rest of the program does not need changes.)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: I would recommend doing this in two phases, as in Lab 17: 1. First just worry about sorting the array of speeds. Don't concern yourself with getting sorting the parallel arrays (the day numbers/dates). [Solving this part of the problem alone will earn you up to 16 points on the lab. It's the bulk of the thinking.] 2. Once you get the speeds sorted, then sort the day numbers/dates in the parallel array. Hint : you don't need any more loops or if statements to do this. The output should look the same as in Lab 17, except that the speeds are sorted. Lab Report Contents Code At least 2 sample runs...
View Full Document

This document was uploaded on 02/10/2011.

Ask a homework question - tutors are online