Week11

This week Monday, we continued with the design and implementation of classes. We first looked at the Date class: both using and modifying it. We also designed a class from specification: Question class and practiced the iterative enhancing design approach.

This week Tuesday, we continued with file streams. We learned how to open and read input file streams, how to write to file streams. We also covered how to read one line versus one character from a file. We also learned how to create streams from strings.

Powerpoint files

classes3

streams


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

sentinel_cpp

countw_cpp

sum10validnums_cpp

sum10validnumsfixed_cpp

mindatainput_cpp

countintegers_cpp

longestword_cpp
longerwords_cpp
outfile_cpp
filelines_cpp
filelines2_cpp
parselines_cpp

prompt.h prompt_cpp