Discussion of chapter topics:

Chapter 0 (yes, indeed!) - In the beginning ...

Chapter 0 sets the background for the course. There the student can find a discussion of what programming is and how programs work in computers. They can also find a brief discussion of files and directories and the most important part: how to set up the compiler environment to run their programs. If students are using computer labs where the compilers are installed in a network, they will need help in having their project files set up.

Chapter 1 - Get Fit.

It is imperative that students know how to run any of the example programs before they start chapter 1. Chapter 1 introduces the C++ language and the use of a particular class of objects developed for the course: the athlete class. Students will learn to instantiate objects and to operate with them by invoking their member functions. Athlete objects also have a member function "say" that allows a tiny text (or value) to be written under the athlete picture. Unknowingly, students will be already dealing with a limited form of text output at this stage.

Objects of class Clock and Box are also used. Clock objects allow measurement of elapsed time and also may force the program to wait a specific amount of time. Box objects are useful to display information on the screen.

Sample software

Chapter 2 - Get Smart.

The main purpose of chapter 2 is to introduce the student to functions. In a few experimental courses where I tested this material, the early learning of functions paid dividends. Students are ready to develop a function for anything they identify as meaningful action. This chapter also explores the use of arguments, (either passed by value or by reference), and the concept of scope.

Most examples will still revolve around the athlete objects. Athletes can be passed as arguments and then the fitness exercise can be performed with them, if desired.

Additionally, there is another subject introduced in this chapter: the use of variables. Use of variables includes not only their purpose and definition, but also simple ways that variables can be used in expressions as well as been output or input from the keyboard.

At this stage, the students will be able to input values using special dialog boxes that make input operation very easily understandable. A simplified version of the standard "cin" and "cout", namely "Cin" and "Cout" are also made available at this time.

Sample software

Chapter 3 - Let's do it again.

As the title suggests, this chapter deals with repetitions. The usual repetition mechanisms in C++: the while, the for, the do / while are studied still in association with athletes and fitness exercises.

A special function "yesno" is presented in this chapter. This is a function that takes a string as an argument and presents it in a dialog box along with buttons marked "yes" and "no". As a result the function returns either 1 (meaning "yes") or zero otherwise. This makes it specially easy for the student to ask if you want to go on repeating something. By invoking the function with the string "is this enough?" the dialog with the user becomes very straightforward.

Sample software

Chapter 4 - To be or not to be.

You guessed right, this chapter deals with decisions.

Usual structures along with the conditions specified by logical expressions are introduced in this chapter. To make the subject more interesting, instead of the athlete, a robot is used in most examples. The robot can be used to mark squares in the floor (and therefore make a drawing), measure distances and other things.

Included in this chapter is a discussion of recursion using the robot as a learning tool.

Sample software

Chapter 5 - Dealing with numbers.

This chapter deals with numeric variables and expressions. As applications, sections in this chapter explore graphics using special classes descending from screen objects: circles, squares and boxes among others. These objects can be created, painted, resized, placed anywhere in the screen and erased.

By declaring a small circle and making it move so that the vertical coordinate is a function of the horizontal coordinate, one can draw graphs of functions. On the other hand, if objects are erased before being moved, one can produce an animation. Moreover, since it is possible to keep track of the real time, animations may actually simulate real life situations.

Sample software

Chapter 6 - Get Smarter.

Students are dealing with objects since chapter 1. They know how to instantiate objects, how to invoke member functions etc. but they don't know yet how to create a class of objects. This is the purpose of chapter 6.

The class of clock objects is dissected as an example. Students will notice that they know how to use a given function (windows API) to compute the elapsed time, reset the clock and wait for a given period. All they will have to learn is how to put that into an object. Also, since the clock should be initialized when created, the concept of a constructor is introduced at this point.

Other examples are used to illustrate how to create classes. The chapter includes a discussion and examples of inheritance, encapsulation and polymorphism.

Chapter 7 - Arrays and Structures.

The discussion of arrays first shows a collection of objects designated by an index. A collection of athletes to start with. Numeric and text arrays are then studied followed by structures.

Chapter 8 - Get Real!

This chapter turns to the standard world of C++ for input and output. Streams for input output and files are the subject of this chapter. From then on, the students will no longer need to rely on the classes specifically developed for this course.

Chapter 9 - What a life ... !

The purpose of this final chapter is to expose the students to what they may expect in professional life, what other subjects they will have to learn, give them some practical advice and explore a slightly larger application development step by step.

One of these applications, the multimedia spelling game, is developed with two approaches. The first approach is heavily object oriented and the other not as much. This will help the students understand the possibilities of devising classes and objects in a program or design.