Computer Science Using C++

Ch. 16 Exercises Remarks


Exercise 16-1 (p. 313)

Find the file ALLOCATE.CPP in the template folder.

Answer the Section 16.1 Questions #1-5 on p. 313 at this time if you haven't already done so.

Exercise 16-2 (p. 317)

Save the program as COUNTIES.CPP. You will have to do a considerable amount of typing when entering the code for this main function. The code is presented on p. 317. It is important that you think about what you are typing since you have not used linked lists or structure pointer operators before.

Exercise 16-3 (p. 319)

Save the program as COUNTIES.CPP. The code for the function that you have to type in this exercise can be found in the templates folder. You may use copy and paste to add it to COUNTIES.CPP.

Exercise 16-4 (p. 320)

Save the program as COUNTIES.CPP. The code for the function that you have to type in this exercise can be found in the templates folder. You may use copy and paste to add it to COUNTIES.CPP.

Exercise 16-5 (p. 321)

Save the program as COUNTIES.CPP. The code for the function that you have to type in this exercise can be found in the templates folder. You may use copy and paste to add it to COUNTIES.CPP.

Exercise 16-6 (p. 322)

Save the program as COUNTIES.CPP. The code for the function that you have to type in this exercise can be found in the templates folder. You may use copy and paste to add it to COUNTIES.CPP.

Exercise 16-7 (p. 323)

Save the program as COUNTIES.CPP. The code for the function that you have to type in this exercise can be found in the templates folder. You may use copy and paste to add it to COUNTIES.CPP.

Answer the Section 16.2 Questions #1-5 on p. 324 at this time if you haven't already done so.

Exercise 16-8 (p. 326)

Use the file INSERT.CPP from the templates folder.

Exercise 16-9 (p. 328)

Use the file PHONELST.CPP from the templates folder. You must also add the data file, FRIENDS.DAT, to the project folder in order to run the program. The file FRIENDS.DAT should be found in the templates folder but it may be corrupted or empty. You may have to create a file that contains last names, first names, and phone numbers and save it as "FRIENDS.DAT" using NotePad. Look closely at the code of PHONELST.CPP to know how to create FRIENDS.DAT if you do have write it from scratch. Note that the string "END OF FILE" is used as a sentinel in this data file.

Answer the Section 16.3 Questions #1-5 on p. 328 at this time if you haven't already done so.

Exercise 16-10 (p. 330)

Use the file DOUBLE.CPP from the templates folder. You must also add the data file, FRIENDS.DAT, to the project folder in order to run the program. The file FRIENDS.DAT should be found in the templates folder but it may be corrupted or empty. You may have to create a file that contains last names, first names, and phone numbers and save it as "FRIENDS.DAT" using NotePad. Look closely at the code of PHONELST.CPP to know how to create FRIENDS.DAT if you do have write it from scratch. Note that the string "END OF FILE" is used as a sentinel in this data file.

Exercise 16-11 (p. 331)

Use the file BATORDER.CPP from the templates folder.

Answer the Section 16.4 Questions #1-5 on p. 331, at this time, if you haven't already done so.

Return to Ch. 16 Resources Page


Computer Science Using C++ Home Page | CMPSC 101 Home Page

Mr. Minich's Wyo Home Page | Mr. Minich's PSU Home Page

Minich.com Web Design