Site Map  Search

OOA Home OOD content UML Corrections book Code object Exercise Solutions oriented Resources tutorial Miscellany textbook

Code Samples

General

I am making some example C++ and Java code from my courses available. It is the Alice's Restaurant case study. It is organized cumulatively, exercise by exercise, directory by director. It was developed in the early days in Visual C++, etc. Now it is maintained in the excellent Eclipse. This means that the C++ has successfully compiled under the Microsoft and GNU compilers. There are some dusty corners which may have escaped compilation or execution for a while. If anything doesn't work, do send me the errant code and the [gulp] error message.

The code should be self-documenting. If it isn't, please let me know. In many files there are pedagogical notes presented as comments. I would also welcome any comments, especially improvements.

You can follow the code on-line, project by project [TO BE DONE], or you can download everything in a C++ zip file (75 KB), or a Java zip file (60 KB).

Start C++ tutorial

Start Java tutorial

Chapter by chapter

Many of the code samples of Object-Oriented Analysis and Design are available in a wider range of languages than were included in the book.

I apologize (well I don't really) for the way case is handled in the C# examples. I have used the same conventions as for Smalltalk, Java and many C++ers, which is capitalizing word beginnings, except for the first letters of identifiers which are only capitalized for object type names. I plead consistency (and laziness (and prejudice)). (And I'm not going to rant about yet another language the world didn't need, or yet another capitalization scheme (grocers' capitals they're known as round here)). (Looking at all these parentheses has set me wondering if I'll ever find the time to do some Lisp versions as well.) I have actually followed Eiffel's case conventions, however. Eiffel's was a venerable and much earlier OO language.

Anyone who has done versions of the book's code examples in other language and who would like to donate them to the site would be welcomed with open arms (well I reserve the right to debate any style questions just a little bit).

Chapter 9 -- Design

To be continued