Answer the following questions regarding Case Study III on pp. 301 - 306:
1/ What is a look-up table? Where else have you seen look-up tables?
2/ What is the mileage between Cincinnati and Denver?
3/ What is the default value for the matrix cities?
4/ What is the name of the file pointer that is used in MILEAGE.CPP (see p. 303)?
5/ How is the parameter destination_city passed to the function get_cities?
6/ Copy the mileage.cpp, vector.h, matrix.h, and mileage.dat files into a newly created folder named CaseStudyIII in your network directory. Execute the mileage.cpp file and follow the 4 steps at the top of p. 304. In completing step 2, run the program five times choosing different pairs of cities. Neatly write your results.
7/ Make the necessary modifications at the bottom of p. 306.
8/ Run the program five more times to verify that you can determine mileage to and from Memphis. Neatly write your results.
9/ Explain in detail the changes that you had to make to any necessary files according to the instructions at the bottom of p. 306. Could anything be done to the program to make this project easier to update if more cities were added in the future?
Return to Ch. 15 Resources