Week5_1

This week we first summarized what we learned about classes last week. Then we covered class design from scratch with the Question class and practiced the iterative enhancing design approach. We also continued with the details of the Robot class for our next homework.

Then we covered reference parameters (pass by reference) from Chapter 6.2.3 of the textbook. Examples covered in class are not from book, but can be found below. However example programs of the book is also good, so please have a look at them.

In the last hour, we could also start streams and learned about the details about the cin standard input stream, how it returns bool to help us verify input and also detect the end of an input stream.

Powerpoint files

params

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

date.h date_cpp

usedate_cpp

datedemo_cpp

fathersday_cpp

date_modified.h date_modified_cpp

demodatemodified_cpp

simplemathquest.h

simplemathquest_cpp

simplequiz_cpp

passbyvalue_cpp

passbyreference_cpp

roots_cpp

sentinel_cpp

countw_cpp

sum10validnums_cpp

sum10validnumsfixed_cpp

mindatainput_cpp