Analysis and Design Briefing

Normally the course Object-Oriented Design and Programming using C++ (or Java, C# or Smalltalk) is a follow-up to the Object-Oriented Analysis and Design course. For mixed C++, etc. courses where there are participants who have not followed the analysis and design course alongside participants who have, we have prepared these notes to brief those participants who have not been on the analysis and design course.

People going on the five-day intensive course might also benefit from reading this although the material will be covered.

The Themes of Object-Orientation

We established some crucial characteristics of an object.

The Development Stages

We planned some stages to get us from the original need to the technology of the day.

The Case Study

Our case study concerns a small restaurant.

You have decided to retire from full-time software engineering and are going to open a small restaurant. You're still interested in object-oriented programming however, and are planning to write a Smalltalk application, to run on a Mac, that will help administer the restaurant.

You have realized that initially the system can help with booking, printing the menu and the inventory.

You expect to interface to some standard accounting packages and do not anticipate developing the sales, purchase or financial accounting yourself.

You anticipate using the system in the kitchen to help the chef with scheduling but you're not yet sure if that is likely to be successful.

With the increasing availability of hand-held radio-linked terminals you anticipate being able to handle order entry as well, at some point in the future.

We analyzed the subject matter and applied some object criteria and derived this first design (using the Unified Modelling Language):

(This is a very superficial sketch. The design was eventually a much improved version of this, but that's another course (or book).)

We then carried out some CRC sessions (Class, Responsibility and Collaboration) and discovered the following interaction pattern for one of the key use cases:

(Again, there were improvements to the above.)

In the light of these discoveries the first cut design was modified to this:

So this is the situation we will be starting to implement, in C++ (or whatever), during part 1 of the design and programming course. Don't assume the above is correct. There is plenty of scope for improvement.

If any questions occur to you, do write them down and ask the lecturer during a break on the course.

The Unified modelling language

A full guide to the UML can be found at http://www.johndeacon.net/UML. Basically the rectangles in the type-relationship diagrams are types -- service provisions soon to be implemented with classes. The lines between the types indicate linkages which we suspect the implementing classes' objects will have to possess. The arrows indicate the direction in which the links will be used (message passing direction).

The diamond, rather confusingly, is not an elaborated arrowhead; indeed the arrow, if you drew it would be at the other end. Think of the diamond as a symbolic indication when the role name of the relationship would have been "has"; i.e. the diamond is placed next to a composite object, and we expect the composite object to send messages to its component objects. (There's much more to the relationships than this; but, once again, that's another course.)

In the "ladder" diagram, the vertical rails represent objects (not classes), and the horizontal rungs the messages they send to each other during an example scenario. Time runs down the page.

[ Briefings Home Page | Training Courses from John Deacon | Books by John Deacon | JDL Home Page ]