Week 4

In this week, first we finished some topics that we did not have time to cover previous week. Then we covered functions from Chapter 2 (Sections 2.4, 2.5 and 2.6) of the textbook (Tapestry). The functions.ppt file covers functions, parameters and variable scope rules. Some slides are not in the book. For example, scope rules are not explained in the book in that way.

In the extra lecture on Wednesday, we covered conditional execution concepts and if/else statements from Chapter 4 of the textbook. The topics are from Sections 4.2, 4.3, 4.4 and 4.7. The notes are in if.ppt. Example codes related to if statements are not in the book, but you can find them below.

Powerpoint files

functions.ppt
if.ppt

C++ codes discussed in class (some of them might have been modified in class to show extra features)

parts.cpp
totem.cpp
area_f.cpp
oldmac2.cpp
macinput2.cpp
 

with_if_else.cpp
with_if.cpp
if_after_else.cpp
if_after_else2.cpp
if_after_if.cpp