Ooad
Ooad
Ooad
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
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.
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
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.
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
The oven is off, the door is closed, and the oven light is off.
Cook Oven
Open Door
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.