Вы находитесь на странице: 1из 5

Birla Institute of Technology & Science, Pilani Work-Integrated Learning Programmes Division Second Semester 2010-2011 Mid-Semester Test

(EC-1 Regular) Solution Course No. Course Title Nature of Exam Weightage Duration Date of Exam : SS ZG514 : OBJECT ORIENTED ANALYSIS & DESIGN : Closed Book : 40% : 2 Hours : 06/02/2011 (FN)

2 a) What is CRC? What are the three steps in CRC process? Draw any one CRC card for Library management system? [4 M] Classes, responsibilities, and collaborators is a technique used for identifying classes responsibilities, and collaborators and therefore their attributes and methods. Furthermore, CRC can help us identify classes. CRC is based on the idea that an object either can accomplish a certain responsibility itself or it may require the assistance of other objects. CRC cards are 4``X 6`` index cards in which all the information for an object is written is cheap, portable, readily available and familiar. The classes, responsibilities and collaborators process consists of three steps: _ Identify classes responsibilities (and identify classes). _ Assign responsibilities. _ Identify collaborators.

b) What is unidirectional association? Explain how it is different than Bidirectional association with an example. [3 M] With a unidirectional association, you can navigate from one class to another (As indicated by the direction of the arrow) but not vice-versa. It is conveniently implemented using a reference. Conceptually allassociations can be thought of a bidirectional, but unidirectional associations are important for specification and implementation models. A unidirectional association is one that may be traversed in one direction only. For example, in Figure 1 you see a unidirectional association from Person to Address. You know it is unidirectional because the association line has an arrowhead pointing from Person to Address. The implication is that Person objects know about their Address objects, but Address objects don't know about the Person objects that live there.

Associations may be bi-directional which are navigated in either direction. An association is a linkage between two classes. Associations are always assumed to be bi-directional; this means that both classes are aware of each other and their relationship, unless you qualify the association as some other type. Bidirectional associations force interdependency between the two classes. Any change to one class may cause a change to another.

c) Define use-case.? When extends association is used? [3 M] Use cases are scenarios that describe how actors use the system. A use case is an interaction between users and a system. It captures the goal of the users and the responsibility of the system to its users. Jacobsons definition of use case is, A use case is a sequence of transactions in a system whose task is to yield results of measurable value to an individual actor of the system. The extends association is used when you have one use case that is similar to another use case but does a bit more or is more specialized. It is like a subclass. Extends association is utilized to expand the common behavior to fit the special circumstances.

********

Вам также может понравиться