October 2001
Intermediate to advanced
640 pages
18h 58m
English
This chapter presents the first of several case studies (or paradigms, in the original sense of the word) of programs written in an object-oriented style. The programs in this chapter will be rather small so we can present versions in several different languages. Later case studies will be presented in only one language.
After first describing the problem, we will discuss how an object-oriented solution would differ from another type of solution. The chapter then concludes with a solution written in each language.
In the game of chess, the queen can attack any piece that lies on the same row, on the same column, or along a diagonal. The eight-queens is a classic logic ...
Read now
Unlock full access