Chapter 9
A Case Study—A Card Game
In this third case study we will examine a simple card game, a version of solitaire. A slightly different rendition of this program was presented in C++ in the first edition of this book and rewritten to use the MFC library in another book [Budd 1999]. The program was translated into Java in the second edition and revised once again in Java in yet another book [Budd 1998b]. The program presented here is one more revision, this time translated into C#.
I have used this case study in so many different forms because the development of this program is a good illustration of the power of inheritance and overriding. We will get to those aspects after first considering some of the basic elements of the game. The complete ...
Get An Introduction to Object-Oriented Programming, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.