"Excuse me, but I am in the middle of fifteen things, all of them annoying"
Susan Ivanova, Babylon 5


"What did y'all order a dead guy for?"
Jayne Cobb, Firefly


"Get the cheese to sickbay"
B'Elanna Torres, Starship Voyager


"There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened"
Douglas Adams


"That don't impress me much!"
Shania Twain, Come on over


"Stop the pigeon! Stop that pigeon now!"
Sheriff of Nottingham, Sherwood Forest, The Adventures of Robin Hood


place
Typical Responsibilities of Description Classes
Home > SoftwareDesign > ModellingInColour > Description
The typical responsibilities of Description classes expressed as typcial attributes, operations and associations.

The Description class archetype is one of four class archetypes in Peter Coad's 'modeling in color' object-oriented analysis and design technique.

A Description class models a catalog-entry-like description. It is a collection of values that apply again and again. It also provides behavior across the collection of all things that correspond to its description. [Coad99]

Like all the class archetypes in Peter Coad's 'modeling in color', the usefulness of the Description class archetype in reviewing and building object models is due to its typical responsibilities, and the lists of typical attributes, operations and associations that represent those responsibilities.

Description typical responsibilities
Figure 1: The Typical Responsibilities of a Description

Typical Attributes

The typical attributes of Description classes include:

The type Attribute

A type code or name is an obvious kind of attribute that would typically be found in a Description class. For a car dealership catalog this would be the model name or number of the car e.g. 528i in a BMW dealership or Civic in a Honda dealership.

Related Operations: None
Related Associations: None

The description Attribute

Description objects often need to have a longer textual description of the item so there is a description attribute in the Description class archetype to reminds us to check if our specific Description classes need this. For example this attribute can provide the two or three lines of marketing teaser in a catalogue extolling the virtues of a BMW 528i or Honda Civic.

Related Operations: None
Related Associations: None

The itemNumber Attribute

The itemNumber attribute suggested by the Description archetype represents the number of the entry for this item in a catalogue. This is usually some sort of local identifier in the same way that the numbers on the menu uniquely identify a dish within a particular Chinese take-away but the numbers for the same dishes are different in different Chinese take-aways.

Related Operations: None
Related Associations: None

The defaultValue Attribute

Description classes typically have a set of attributes holding default values or values common for all the entities they described. For example, wheel type (steel or alloy), interior type (cloth or leather), air-conditioning (included or not). Individual cars described by the blue BMW 528i or Honda Civic object may have the default value for these attributes or a customized value.

Related Operations: None
Related Associations: None

Typical Operations

The typical operations of Description classes include:

The listPPTs Operation

A typical responsibility of a Description object is the ability to list all or a subset of the items it describes.

Related attributes: None
Related associations: Description - Party, Place, Thing

The assessAcrossPPTs Operation

The assessAcrossPPT() operation suggests that a Description object often benefits from operations that calculate some aspect of the performance of the entities it describes. In our car make and model example that might be an operation to calculate the average sale price of all objects representing the specific cars described by one of Description objects. In other words, what was the average sale price of all the BMW 528i's we have sold?

Related Attributes: None
Related Associations: Description - Party, Place, Thing

The findAvailable Operation

The findAvailable() operation reminds us that a typical kind of operation found on a Description class enables users of an object of that class to locate one or more Party, Place, Thing objects that are able to participate in a particular Moment-Interval object.

In our car dealership example this might could translate into an operation for finding a car of a particular make and model that is ready to be sold.

Related Operations: None
Related Associations: Description - Party, Place, Thing

The calculateQuantityAvailable Operation

The calculateQuantityAvailable() operation reminds us that a typical kind of operation found on a Description class enables users of an object of that class to count how many Party, Place, Thing objects that are able to participate in a particular Moment-Interval object

In our car dealership example this might could translate into an operation for counting how many cars of a particular make and model are ready to be sold.

Related Operations: None
Related Associations: Description - Party, Place, Thing

The calculateTotalFor Operation

Description objects often need calculateTotalFor() operations that calculate some sort of result for the Party, Place, Thing objects that they describe

In our car dealership example this might could translate into an operation for calculating the profit from all the sales of a particular make and model over a certain period of time.

Related Operations: None
Related Associations: Description - Party, Place, Thing

The listInstances Operation

The listInstances() operation is a class scope operation. It reminds us that a typical responsibility of a Description class, like those of any of the class archetypes, is to be able to search for, find, and list subsets of its instances that match some set of criteria.

Related attributes: None
Related associations: None

The assessAcrossInstances Operation

The assessAcrossInstances() operation is a class scope operation. It reminds us that a typical responsibility of a Description class, like those of any of the class archetypes, is to be able to assess the performance of a subset of its instances that match some set of criteria.

Related attributes: None
Related associations: None

Typical Associations

The typical associations of Description classes include:

The Description - Party, Place, Thing Association

This association links the Description objects to the Party, Place, Thing objects that it describes.

Related attributes: None
Related operations: findAvailable, calculateQuantityAvailable, calculateTotalFor