Comments to Lecture 2 Presentation

Tuesday, June 3, 2008

Comments

What is Object Oriented Analysis Model?

A model is an abstract thing to understand something well. We use analysis model to capture important requirements, for communication purposes and to explain the system the way we want. There is no perfect model as such. If your model is good enough to explain all the requirements, then that is going to be enough.

Object Oriented Analysis Model is used to identify domain classes and objects. For example, in a banking system, bank policy, interest rate are domain objects. The domain classes are identified during the analysis phase. These classes build the conceptual model of the system domain. At design phase, more classes will be added. Design classes are added by the architect to make the model more elegant and to arrange communication. During implementation phases more classes will be added. Delegates in C# are an example of such implementation classes. Here just because you are using C#, you are required to have delegates. Similarly depending on the technology that is being used to develop the system, more classes may needed to be added.

Requirements document

Requirements document should be clear an unambiguous. Requirements document or the SRS is an important thing in any software project. It’s the agreement client and the software company. At early stages of software development, requirements are not very clear. Through SRS, we capture requirements. Therefore SRS is a tool that is used to collect requirements. We can use SRS for planning of activities such as QA, support etc.

Natural language is ambiguous. Same word may convey different meanings. People understand differently depending on the person’s background, experience, knowledge and culture. Therefore experience and proper knowledge is required to identify classes from requirements document. Also you can’t stick to one method. CRC is another option where you can go for searching classes.

Class Responsibility Collaboration (CRC) Cards

To identify objects we need a better way. CRC is one option. Every class has responsibilities. But they can’t fulfill these responsibilities alone. They need to collaborate with other classes in order to fulfill these responsibilities. CRC concerns responsibilities.

  • CRC can be used in both analysis and design.
  • Responsibility of a class is the behavior of that particular class or what actions that the class should perform.
  • Both CRC and class diagrams represent the same. Unlike in Class diagrams, in CRC, class attributes are missing. In CRC, we are only interested in finding responsibilities and collaborators.
  • Sometimes you may need to invent new classes as collaborators.
  • When considering responsibilities and collaborations, always make sure whether a particular class is the suitable class to fulfill a particular responsibility.

The difference between class and object

Class has name, variables and operations for it where as object has id (to uniquely identify at run time), state (stored in attributes), behavior (depends on the state). Here the state is very important in Object Oriented Design. It’s important to manage the state of all objects during entire life cycle. All objects should be created in valid states. This is the job of the constructor. All methods that operate on objects should move objects from one valid state to another. An object’s behavior depends on its state. For example, the coin box can’t operate when it’s full.

Scope of a system

You have to identify the things that are inside and things that lie outside the system boundary. Nouns that correspond to entities that are inside the system boundary will be listed and nouns that represent either the system boundary or entities outside the system boundary will be rejected.

Surangi N. Alexander (044052)

0 comments: