605.404.71 Object-Oriented Programming with C++

Summer 2007

Homework 04 (modified)

John E. Boon, Jr.

Lecturer in the Engineering and Applied Science Programs for Professionals

Johns Hopkins University

For all JHU-related matters contact Mr. Boon via email at jboonjr@apl.jhu.edu

problem_points = ceil[ exp(*problem_difficulty) ]

Exercises

  1. Section 7.10, page 163, exercise 4 (*1.5)
    1. This program should accept command lines such as

      "cat chap7_num4.cpp chap7_num14.cpp"

    2. The program's result should sent to a file and consist of each line of chap7_num4.cpp followed by each line of chap7_num14.cpp in the command line example given
  2. Section 7.10, page 163, exercise 7 (*2.5) - solve this with two separate programs:
    1. (7a) first solve "Write a funtction for entering new words into a tree Tnodes. Write a function to write out a tree of Tnodes. Write a function to write out a tree of Tnodes with the words in alphabetical order.
    2. (7b) next solve "Modify Tnode so that it stores (only) a pointer to an arbitrarily long word stored as an array of characters on free store using new. Modify the functions to use the new definiton of Tnode.
  3. Section 7.10, page 164, exercise 14 (*1)
  4. Section 8.5, page 194, exercise 5 (*2)

Extended Programs

  1. None assigned

Extra Credit

C++ Program Preparation and Delivery Instructions:

  1. CD formatted for Windows/Intel OR single .zip file transmitted to jboonjr@apl.jhu.edu containing:
    1. program source code, including completed code header documentation and
    2. data file(s) required by your program
  2. printed listing(s) of your program(s) (NOTE: limit wrapped lines and prevent truncated lines in your printed output)
  3. printed test case(s) and result(s)

Page last updated Sunday, 15-Jul-2007 21:02:43 EDT.

There have been [TextCounter Fatal Error: Could Not Write to File _Notes_Boon_605404_homework_HW04_S07_shtml].

Return to 605.404 Course Home Page

Copyright © 2007 John E. Boon, Jr.