Sequence Diagram   «Prev 

Discovering attributes

How are attributes used in the object model?

Every piece of information used in an operation has to belong to an object in your model.
The search for the sources of the data is one of the fastest ways to confirm whether or not your model is complete.
Another benefit of this approach is the explicit justification for each attribute. That is, when you add attributes just becauseyou think that they describe an object. then the only cost justification is your opinion. But when you add attributes only when they are required in an interaction, then the attribute is implicitly justified because it is required to support a use case.
Now, consider the fact that every attribute requires a definition, update operations, edit rules, code, testing, and maintenance support. That is a lot of time and money. Justifying the need for attributes has a direct effect on the cost and time needed to deliver an application.
Analysis refers to the translation of a real-world project description into a software project description. Object-oriented analysis is concerned with developing software engineering requirements and specifications as a system's object model, as opposed to the traditional or functional approaches. This chapter describes first the notion of an object, and then discusses the use case view, considered central to UML.
The use case view describes the externally visible behaviour of the system. The next important part of the analysis is the domain modelling that records important system concepts.

We shall introduce the notion of object and object-oriented programming by comparing it with the programming of the abstract data types. The whole idea of software engineering is to identify and write a software program that solves a real-life problem. However, real-life problems are usually unclear. It is necessary to separate important details from unnecessary details: this is called the abstract view of the problem or the model. This process of modeling is called abstraction. The model defines an abstract view to the problem. This implies that the model focuses only on defining properties of the problem. These properties include the affected data and the identified operations of the problem. As an example, consider the renting of bicycles in a kiosk at East Coast Park. The manager of the renting store comes and asks you to create a software program that deals with the rental of bicycles. Bicycles are real things which can be characterized with many properties. Here are some of them:
  1. number,
  2. size,
  3. date of acquisition,
  4. date of renting,
  5. date of returning,
  6. shape,
  7. color,
  8. renting price per hour,
  9. bell sound, and
  10. the number of wheels.
Certainly, not all of these properties are necessary to solve the renting of bicycles problem. Only some of them are problem specific. Consequently we created a model of a bicycle for the problem. This model only implies properties which are needed to fulfill the requirements of the renting of bicycles, such as number, date of renting, date of returning, renting price per hour. These properties are called the data of the bicycle model.