Building Skills in Object-Oriented Design, V4

Step-by-Step Construction of A Complete Application

This is release 4.2003, published Mar 04, 2020.

Getting Started

In this part, we’ll look at some general topics required to get started. The first chapter will provide some foundations, talking about the problem domain, the solution, and some general ideas on how the work will proceed.

The remaining chapters will provide specific guidance on setting up a working development environment, writing some basic unit tests, and starting down the road to producing useful documentation. These sections will set the stage for all of the work which follows.

Roulette

Roulette is a stateless game with numerous bets and a very simple process for game play.

The chapters of this part present the details on the game, an overview of the solution, and a series of sixteen exercises to build a complete simulation of the game, plus a variety of betting strategies. Each exercise chapter builds at least one class, plus unit tests; in some cases, this includes rework of previous deliverables.

Craps

This part describes parts of the more complex game of Craps. Craps is played with dice. Craps is a game with two states and a number of state-change rules. It has a variety betting alternatives, some of which are quite complex.

The chapters of this part presents the details on the game, an overview of the solution, and a series of eleven exercises to build a complete simulation of the game, with a variety of betting strategies. The exercises in this part are more advanced; unlike Roulette, we will often combine several classes into a single batch of deliverables.

There are several examples of rework in this part, some of them quite extensive. This kind of rework reflects three more advanced scenarios: refactoring to generalize and add features, renaming to rationalize the architecture, and refactoring to extract features. Each of these is the result of learning; they are design issues that can’t easily be located or explained in advance.

Blackjack

This part describes the more complex game of Blackjack. This game has a number of states and a number of complex state-change rules. While the betting rules are simple, the game play is more complex.

The chapters of this part presents the details on the game, an overview of the solution, and a series of six relatively complex exercises to build a complete simulation of the game. In the case of Blackjack, we have to create a design that allows for considerable variation in the rules of the game as well as variation in the player’s betting strategies.

Fit and Finish

A finished application includes more than just a collection of packages. We’ll need to build a Command-Line Interface (CLI) to operate this program. This isn’t a sophisticated OO design problem. This is a collection of exercises in using the standard library to create the final application.

Production

This book was built with Python 3.7

  • Sphinx 2.2.0

  • MacTeX 2019

Indices and tables