CHAPTER 4 OVERVIEW -HENDRICKSON
4. Ch-4 Sub-programs(functions & header files)
   a. Lecture over new concepts
      4.1 program design(structured)
         1. Understand the concepts of modularity & bottom-up design                                    
         2. To be aware of the use of structured programming
      4.2 User defined functions
         1. Understand the need for user-defined functions
         2. Use correct syntax when declaring and implementing a 
            funtion
         3. Use stubs and drivers to test functions
      4.3 Parameters(of functions)
         1. Understand & use appropriate parameters in functions
         2. to be able to understand the difference between "value" 
            & "reference"
      4.4 Functions as subprograms
         1. To understand how functions can be used to design programs
         2. To use functions to get data
         3. To use functions to perform required tasks
         4. To be able to use functions for output
      4.5 Scope of identifiers
         1. To understand "global" variables
         2. To understand "local" identifiers
         3. To understand the "scope" of variables or identifiers
         4. To understand and control side affects of programs
         5. To use appropriate names for variables (in main & functions)
      4.6 Programmer defined libraries
        1. To be able to define libraries
        2. To distinguish between library header files and library
           implementation files
        3. To create a student-file for personal use(honor only)
      4.7 Graphics(funtions & fill patterns)
        1. To learn how to declare a graphics function
        2. To learn how to use set-pattern & fill-color
        3. to learn how to develop functions for drawing filled shapes

   b. Programming assignments discussion(programs must have functions)
        1. program 16 page 192 #1(no errors)
        2. program 17 page 192 #2(no errors)
        3. program 18 page 193 #3(no errors)

        4. program 19 page 193 #6(note errors in book)(honors)
        4. program 19 page 194 #7(regular..see teacher for partial
           solution)
        5. program 20 page 195 #9(use functions over & over)
           (regular & honors)
        6. program 21 page 196 #11(see teacher for corrections)
           (regular)
        6. program 21 page 197 #12(no errors)(honors)

        (extra credit)
        7. program 22 page 198 #13(one error, 
           see teacher-extra credit)(honor)
        7. program 22 page 200 #15 or 16 (regular) (easy!!)

        8. program 23 page 201 #18(regular)
        8. program 23 page 201 #19(honor)

   c. Debugging techniques
(see chapter 3 +)
        1. declare the prototype of function & copy below main 
           without ";"
        2. make sure the order of the arguements agree from main and 
           the declarations of the functions
        3. for clarity, use different but similar variables in main 
           and the functions
        4. use "print" statements to trace values or the debugger
        5. if a value is to return, don't forget the "&" in the 
           declaration
        6. in user defined headers, make sure the paths are complete
        7. side affects..don't use a global variable in a function
           without a parameter...
        8. one value return functions, use the "return" if necessary..
        9. every open "{" must have a close"}" liek begin and end in Pascal
           a. especially in function design...don't forget...

   d. Homework
        4.1 none
        4.2 page 141 #1-9 all
        4.3 page 150 #1-3 all
        4.4 page 159 #1-3 all
        4.5 page 169 #1-12 all
        4.6 page 174 #1-4 all
        4.7 page p182 #1-4 all
        Chapter Vocabulary page 188(39 words)
        Chapter Review P191 #1-27


   e. Chapter Tests & Quizzes

 Go back    to chapter 3. . . .

 Go forward to chapter 5. . . .

 Go back to Computer Science page. . . .