There is a file at http://euclid.nmu.edu/~randy/Classes/CS201/Airplane-Assignment/planelist.data. This file has ABOUT the following format:
A quote mark
Eight bytes of the price, stored as an integer written in ASCII.
Two spaces.
Three ‘0’s.
One space.
Four bytes of the year, stored as an integer written in ASCII.
Three spaces.
Twenty-nine bytes describing the make and model of the plane.
A quote mark.
A carriage return.
There are 451 records in this file. The file is 23,903 bytes long. It is in order by price, with the highest price first.
Your goal is to write a program that uses binary search to find airplanes for sale in this list. Given a specific price, you will find airplanes for sale of that price.
YOU MAY NOT STORE IN RAM MORE THAN ONE RECORD AT A TIME. NEVER! NEVER-NEVER!!
Points |
Task |
50,000 |
Can find an airplane of a given price. |
50,000 |
Can find all airplanes at a given price. |
50,000 |
Can work with files of any size. |
50,000 |
Can detect corrupt files, and handles the error without printing bad data or crashing. Printing an error and exiting is OK. |
50,000 |
Can order the answer by year. |
-5,000 |
Every variable name that is not immediately obvious. |
+10,000 |
Turned in on or before Wednesday Oct 16th. |
-10,000 |
Turned in after Monday, Monday, Oct 21st. |
-10,000 |
Turned in after Monday, Oct 28th. |