EECS 211
How to read Chapter 3

Follow the general steps for reading the book. Focus on the figures with example programs. Compile and run each example. Change each example to try different concepts covered in this and previous chapters.

The examples in the chapter revolve around a "course gradebook" application. This is just the beginning of the application. A first stab at grade processing is not added until the next chapter.

Read the overview of the code examples (Section 3.3). It explains what each example adds, and what programming technique it demonstrates.

How to develop an application

The sequence of examples illustrates how you should develop applications incrementally and gradually.

The key idea is to start with a trivial running program, then add something small and make sure it runs. Do not try to write an entire application at once.

We'll modify the above process in one small but significant way when we get to test-driven development.

How to organize an application

The gradebook application code sits in one file for Figures 3.1 through 3.7. Then there's an important split into two files in Figure 3.9, and another important split in Figure 3.11. The sequence looks like this:

3.9 splits off gradebook, 3.11 splits off interface

In general, real applications will look like Figure 3.11:

How to build an application

The term "build" is used to mean the complete process of compiling and linking multiple code files together to create one application program. Many integrated development environments, such as Microsoft's Visual Studio, will have a menu option called "Build Project." In Unix, there is a tool that we will use called make for building multi-file applications. A similar tool, commonly used for Java, is called Ant.

Look at Figure 3.14 to see how and when the files in Figure 3.11 are used when you build the application.