Introduction to Object Oriented Programming, 3rd Ed
Chapter 6
A Case Study : Eight Queens
Outline
- Statement of the Problem
- OOP Approach
- Observations
- Pointers
- CRC Card for Queen
- CRC Card for Queen - Backside
- Initialization
- Finding First Solution
- Advancing to Next Position
- Printing Solution
- Can Attack
- The Last Queen
- Chapter Summary
Source Code
Other Material
- A printer friendly version of all slides
- HTML page for queen program in Java
(not available on CD, see explanation)
- A puzzle related to the 8-queens is the knights-tour problem.
While slightly more advanced, in Chapter 18 we will introduce
the idea of frameworks. In another book I have written an
example backtracking framework illustrated
using this puzzle.
Intro OOP, Chapter 6, Slide 1