Week 5

This week we started to talk about the class concept and object-oriented programming.

We first started to talk about the Robot class, which is not in the book, but a document (robotworld.pdf) that explains this class in detail is in robot.zip file. All files needed for the Robot class is also in that zip file. simplerobot.cpp is the example program that we have seen in the lecture and we modified it with the TurnLeft function in the lecture also.  robotdemo.cpp and simplerobotdemo.cpp are other example programs  that will be discussed in recitations this week.

classes.ppt is mostly from Section 3.4 and 3.5 of the textbook.

Enumerated type discussion (needed for the Robot class) is from Chapter 9.

We then covered the string class. Some of the topics and example programs may not exist in the book (or may not exist in Chapter 4) (e.g. some string functions are not covered in Chapter 4). Follow the referrals in the strings.ppt file.

All codes covered in class are given below.

Powerpoint files


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