IDENTIFYING OBJECTS AND CLASSES FROM REQUIREMENT SPEC

Thursday, June 5, 2008

Software Requirement Specification (SRS)

Requirement Specification is use to plan the project and finalize the requirements at the initial stage of the project. The main reasons is for using a spec, because of the requirements are not clear at the initial stage of the project and need to come up with a sigh in document with the client by capturing requirements as much as possible. There may be lot of contradictions in the early stage of the document. Then come up with an object oriented design with the help of business analysts and do a requirements analysis process. Then latter stages requirements can be clearly identify and can do the necessary modifications to the specification. There are different techniques to identify classes from a SRS.

  • Textual analysis

A class is conceptually a set of objects of the same kind, and objects represent ‘things’ in the system domain. So nouns and noun phrases in the requirements document can be used as an aid to identifying possible classes. But there are some problems in this method. Such as sometimes nouns and noun phrases are duplicated, have to deal with different ways of referring to the same thing (eg. Member and library member, title and film title etc.), same word ay be used to refer different things (Number can be used to represent Number of DVDs and number of members). There are some guide lines for rejection of candidate classes. Following are some questions that help to reject the candidate classes.

§ Is it a property?

§ Does it refer to a behavior of the system?

§ Is it outside the scope of the system?

§ Does it refer to an aspect of the user interface?

§ Does it refer to connections between other significant entities in the system domain?

§ Is it a word or phrase that is used in talking about systems in general, rather than a reference to something in the system domain?

  • Class Responsibility Collaborator Cards (CRC cards )
A Class Responsibility Collaborator (CRC) model is a collection of standard index cards that have been divided into three sections, as depicted in following figure. Each class has responsibilities. Classes cannot fulfill those responsibilities alone. Classes need to collaborate with other classes and interact with those classes. In simple way a class represents a collection of similar objects, a responsibility is something that a class knows or does, and a collaborator is another class that a class interacts with to fulfill its responsibilities

figure1

Abstract class

An abstract class is a type of class that cannot be instantiated; it merely exists to be extended and contains methods and variables common to all sub-classes. For example consider a hospital system (figure 2).

figure2


Class Categories

There are 3 types of classes.

¢ Analysis classes

Data abstraction directly drawn from the model of the external system

¢ Design Classes

describes a data abstraction introduced for the internal needs of the algorithms in the software

¢ Implementation classes

There are two types of implementation classes.

1.Typed implementation classes: A class that implements a concrete class. Implementation classes are never used directly.

2.Typeless implementation classes: A class that implements a concrete class and provides an interface that is not specific to a given element type.

Ideal Class

A class that has a clearly associated abstraction, which can be described as a data abstraction (or as an abstract machine). The class name is a noun or adjective, adequately characterizing the abstraction. The class represents a set of possible run-time objects, its instances. (Some classes are meant to have only one instance during an execution; that is acceptable too.)




W.G.K.D. Karunarathne(044022)
Level 4




0 comments: