cover art thumbnail

Software Design for Engineers and Scientists

John A Robinson

414 pages, £29.99 (US$49.99)
Published by Newnes, Oxford, August 2004. ISBN 0-7506-6080-5
To buy, visit the Elsevier website:

Chapter summaries, resources and web links

Chapter summary
Downloadable resources
Offsite links referenced in the text

Chapter 1. Introduction

The book is about
  • how to design good software
  • how to program in C++
  • data structures and algorithms
  • scientific and engineering programming

The Introduction provides an outline of the book, explaining how these four themes are developed and integrated.

There are several online versions of Fred Brooks' No Silver Bullet article, but it is not clear how permanent these will be. A Google search will yield a currently-available online copy.

Chapter 2. Fundamentals

From nine historical perspectives on the nature of software come 13 principles and 21 rules to guide design.

Chapter 3. The Craft of Software Design

Six simple practices that will accelerate your development as a programmer and continue to inform your practice of software design.

Chapter 4. Beginning Programming in C++

Because programming in a real language is central to Software Design, this chapter and the next provide a concise introduction to C++, with many examples and summary reference tables. Complete programs  may be downloaded from here, along with some Java examples that are not in the book. Code fragments and a few of the early, small programs are not included.

  • hello.cpp The inevitable "Hello World" first program, page 54.
  • sizeof.cpp A program to print out the sizes of the basic types, page 61.
  • divtest.cpp Division tester program, page 67.
  • diceroll.cpp Dice rolling simulation that illustrates the Central Limit Theorem, page 79.
  • readlocs.cpp A program that reads a simple database and prints some information, page 94.
  • filecopy.cpp A simple file copy utility, page 95.
  • romanize.cpp A convertor to and from Roman numerals, page 98.
  • student_average.cpp Another database program, this time reading students marks and averaging them, page 106.
    • students.dat A sample database file for the student_average program.

Chapter 5. Object-Oriented Programming in C++

The tutorial introduction to C++ continues with discussion of object-oriented facilities like encapsulation, inheritance and polymorphism.
  • stack.cpp Implementation of a stack abstract data type as a C++ class, page 123.
  • location_zone.cpp The location database example from Chapter 4, recast as an Object-Oriented program. page 126.
  • vector.cpp A vector class, page 129.
  • String.cpp A string class, page 138.
  • The set of files for the mountains/cities inheritance program, discussed starting on page 145.
    • loc.h Header file for the location class, page 146.
    • loc.cpp Implementation of the location class, page 147.
    • mountain.h Header file for the derived class mountain, page 148.
    • tellzone.cpp The second (final) version of the main program, page 150.
    • mountain_city.dat A sample database file
    • Makefile A Makefile, not included in the book
  • The set of files for the two-stream student marks inheritance example, discussed starting on page 151.
    • student.h Header file for the student class and the derived classes, page 157.
    • student.cpp Implementation file for the member functions not included in the header, page 158.
    • average.cpp The main program, page 159.
    • streamed_students.dat A sample database file
    • Makefile A Makefile, not included in the book
  • trynew.cpp An illustration of exception programming. Find out what happens when new can't find any memory, page 161.
  • trydiv.cpp Another illustration of exceptions, this time comparing different platforms' behaviour when a number is divided by zero, page 162.
  • stacktemplate.cpp A stack of templated data items, page 164.
  • addnumbers.cpp A program to add line numbers to a file, page 170.
    • remnumbers.cpp A program to take away line numbers previously added by addnumbers. Not included in the book.

Chapter 6. Program style and structure

Advice on defensive programming, finding and eliminating bugs, structuring programs and style. Most examples in this chapter are of code with bugs so they are NOT included here.
  • mkframework.cpp A program to make a framework of header, implementation, test and Makefile, page 190.

Chapter 7. Data structures

The structuring of data within abstract data types.

Chapter 8. Algorithms

Algorithm analysis with a focus on searching and sorting. The code examples here are functions, not full programs.

Chapter 9. Design Methodology

A sceptical review of methodological alternatives.

Chapter 10. Understanding the Problem

Advice on writing a problem statement, steering design by clear criteria, researching the problem domain, understanding users and documentating a specification.

Chapter 11. Researching possible solutions

Analysis, experiment, prototyping and simulation, followed by a discussion of notations and languages for developing designs. The use of state diagrams, statecharts and state sketches for event-driven systems is emphasized and illustrated.

Chapter 12. Modularization

How to divide software into parts to minimize the damage caused by changes to requirements. Localizing information, information hiding and object-oriented modularization.

Chapter 13. Detailed design and implementation

The software technology of Chapters 4 - 8 and the design methodology of Chapters 9 - 12 meet in real programs.

  • fsm.cpp Implementation of a finite state machine solving a real problem showing how the notations of chapter 11 can be translated into code, page 289.
  • table_hashtable.cpp Implementation of Abstract Data Type Table using a hash table. See chapter 7 for an alternative implementation. Here in Chapter 13 the discussion is about how to choose between data structure and algorithm alternatives like these two depending on the problem to be solved. Page 293.

Chapter 14. Testing

Traditional testing versus Test Driven Development; static and dynamic analysis; devising test plans and cases; performance assessment.

Chapter 15. Case Study: Median Filtering

Development of an efficient median filter for signal conditioning and enhancement. The chapter illustrates rapid prototyping, the search for relevant prior art, use of a double-linked list data structure, implementation and testing strategy, the importance of "finishing".

Chapter 16. Multidimensional Minimization - A Case Study in Numerical Methods

Design and development of a simplex minimizer for multidimensional data.

  • simplex.h Header file for the simplex class, page 340.
  • simplex.cpp Implementation for the simplex class, page 342.
  • rosenbrock.cpp The Rosenbrock function test function for the minimizer, page 350.
  • vizsimplex.cpp A vizualization program used to produce figures 16.9 - 16.15 and the animation below. Requires CLIP - Class Library for Image Processing. This program is not in the book.
  • Makefile Makefile, not included in the book.
  • rosewalk.gif An animated GIF showing how a simplex minimizes the Rosenbrock function as in figure 16.15. (Warning: Large file.)

Chapter 17. stable - Designing a string table class

Illustrates development of a flexible class that allows efficient processing of 2D arrays of strings.