CSS 341     Homework # 4

 

Due at Catalyst Drop Box for HW4  by  turn-in time on November 16, 2009

 

 

This assignment  is to be done by each student working alone.  You may discuss general concepts and issues, but not develop code together or share solutions.  Place the answers, with supporting work, in electronic format and submit to  the drop box.

 

When I ask for vbs code, I want to see more than really sketchy pseudo code.  The code may not be fully debugged and polished, but should present a reasonable early version of a program to solve the problem.  Note, because time is short, it is better to have all of the problems addressed with code that is not fully debugged than to have some finished and others not done at all.  If all you get done before deadline is pseudocode or other design framework, that would earn partial credit.

 

 

For problems 1- 3 below  you should design your implementation or using the TextStream Object of vbs and the methods contained there.  The vbs code does not have to execute or be  debugged – but should serve to indicate how you are approaching the problem.  We used it in the notes and examples of Week 4, and it is discussed in Lomax starting on page 413.  See WorkWithTextFiles.vbs and WorkingWithDynamicArrays.vbs in the Week 4 examples.

  1. Gaddis, page 408, #8 (The TextStream Object does not provide for fields within the line or record.  You will need to provide that functionality yourself by dividing each line into two pieces of information.  (You may find the string manipulation functions of vbs (p.443 of Lomax) to be useful in parsing the lines into the two fields or concatenating two fields of information into a single text line for the text object to read or write.  We have used some of these functions in parsing the pathname from the url of the working directory in MP3.)

  2. Gaddis, page 408, Programming Exercise #4  (use vbs code here; OK if not fully debugged.  Design should be obvious, however.)
  3. Gaddis, page 409, #6 (As in #1 above, you will need to provide a functionality that stores two fields of information in the same line or record)

  4. Gaddis, page 476, Algorithm workbench #1.
  5. Gaddis, page 476, Algorithm workbench #2
  6. Gaddis, page 477, #3.  (working  vbs code wanted here)