Ooad

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1. Define multiplicity of an association.

The multiplicity at the target class end of an association is the number of instances that can be
associated with a single instance of source class

2. Outline the advantages of modeling state machine diagrams.

They offer the following advantages: The lifecycle of an object, from initialization to release, can
be modelled. ... The permitted states of an object and the events triggered by state transitions can
be described. This makes the behavior of the object visible and comprehensible.

3. Interpret the meaning of event, state and Transition.


occurrence that is relevant to an object or application. State—the state of an object is determined
by the value of some of its attributes and the presence or absences of links with other objects.
Transition—the movement from one state to another, triggered by an event.

4. Formulate the purpose of Interaction Diagram.


The purpose of interaction diagrams is to visualize the interactive behavior of the system. ... To
capture the dynamic behaviour of a system. To describe the message flow in the system. To
describe the structural organization of the objects.

5. Define design Class Diagram. When to use Class Diagrams?

The class diagram is the main building block of object-oriented modeling. It is used for general
conceptual modeling of the structure of the application, and for detailed modeling, translating the
models into programming code. Class diagrams can also be used for data modeling.

PART - B

6.A Discuss the topic on


Aggregation and Composition.
Generalization and Specialization.
iii) Attributes and Association.

Aggregation (2m) is a vague kind of association in the UML that loosely suggests whole-part
relationships (as do many ordinary associations). It has no meaningful distinct semantics in the
UML versus a plain association, but the term is defined in the UML.
Composition(2m), also known as composite aggregation, is a strong kind of whole-part
aggregation and is useful to show in some models. A composition relationship implies that
Generalization(2m) is the process of extracting shared characteristics from two or more classes,
and combining them into a generalized superclass.
Specialization(2) means creating new subclasses from an existing class
An Attribute is a logical data value of an object.
6B. Describe the UML notation for Class diagram with an example. Explain the concept of link,
association and inheritance.
Definition (2m)
A static view of the class definitions is usefully shown with a design class diagram.
Explanation(8m)
This illustrates the attributes and methods of the classes.
 relationships used in class diagram
 Generalization(class to class)
 Association (object to object)
 Aggregation (object to object)
 Composition (object to object)
Diagram(3m)

7A. Why use an activity diagram? Outline the steps in modeling an activity diagram with an
example.

 How to Draw an activity diagram –


 Identify the initial state and the final states.
 Identify the intermediate activities needed to reach the final state from he initial state.
 Identify the conditions or constraints which cause the system to change control flow.
 Draw the diagram with appropriate notations.

Figure – an activity diagram


 The above diagram prints the number if it is odd otherwise it subtracts one from the
number and displays it.
 Uses of an Activity Diagram –
 Dynamic modelling of the system or a process.
 Illustrate the various steps involved in a UML use case.
 Model software elements like methods,operations and functions.
 We can use Activity diagrams to depict concurrent activities easily.
 Show the constraints, conditions and logic behind algorithms.
7B. Outline the steps in modeling a sequence diagram with an example.
Sequence Diagram Notations
Sequence Diagram Best Practices
How to Draw a Sequence Diagram
Sequence Diagram Common Mistakes
Sequence Diagram Templates and Examples
Sequence Diagram SlideShare Presentation
Feedback on the Sequence Diagram Guide

Sequence diagrams, commonly used by developers, model the interactions between objects in a
single use case. They illustrate how the different parts of a system interact with each other to
carry out a function, and the order in which the interactions occur when a particular use case is
executed.
In simpler words, a sequence diagram shows different parts of a system work in a ‘sequence’ to
get something done.
Sequence Diagram Notations
A sequence diagram is structured in such a way that it represents a timeline which begins at the
top and descends

gradually to mark the sequence of interactions. Each object has a column and the messages
exchanged between them are represented by arrows.

8a. Model a state transition diagram for the following scenarios: here is what happens in a
microwave oven:
i) the oven is initially in an idle state with door open, where the light is turned on.
ii) When the door is closed it is now in idle but the light is turned off.
iii) If a button is passed, then it moves to initial cooking stage, where the timer is set and
lights are on and heating starts.
iv) At any moment the door may be opened, the cooking is interrupted, the timer is cleared
and heating stops.
v) Also, while cooking another button can be pushed and extended cooking state starts,
where the timer gets more minutes. At any moment door can be opened here also/
vi) If the timer times out, the cooking is complete, heating stops, lights are off and i sounds
a beep.
vii) When the door is open, again the oven is in idle state with the door open.

Cook Oven
Open Door

Insert Turn Light On


Food Close Door
Turn Light Off
Press Cook Button
Beep
Start timing for one minute
Turn Light On
Energize Power Tube
Press Cook Button
Beep
Add 60 seconds to remaining cook
time
Press Cook Button
Beep
Add 60 seconds to remaining cook
time -- After 3 minutes of cook time --
Turn Power Tube Off
Turn Light Off
Beep
Beep
Beep

The oven is off, the door is closed, and the oven light is off.
Cook Oven
Open Door

Insert Turn Light On


Food Close Door
Turn Light Off
Press Cook Button
Beep
Start timing for one minute
Turn Light On
Energize Power Tube
-- Less than one minute elapses -
Press Cancel Button -
Beep

Turn Power Tube Off


Turn Light Off
Clear Remaining Cooking Time

8.b. Consider the hospital management system application with the following requirements.
i) System should handle the in-patient, out-patient information through receptionist.
ii) Doctors are allowed to view the patient history and give their prescription.
iii) There should be a information system to provide the required information.

You might also like