Ooad QB

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

OBJECT ORIENTED ANALYSIS AND DESIGN

Unit – 1
1. What is Object-Oriented Analysis and Design?
During object-oriented analysis there is an emphasis on finding and describing the objects
or concepts in the problem domain. For example, in the case of the flight information
system, some of the concepts include Plane, Flight, and Pilot. During object-oriented
design (or simply, object design) there is an emphasis on defining software objects and
how they collaborate to fulfill the requirements. The combination of these two concepts
shortly known as object oriented analysis and design.
2. What is the UML? What are the three ways and perspectives to Apply UML?
The Unified Modeling Language is a visual language for specifying, constructing and
documenting the artifacts of systems.
UML as blueprint, UML as programming language Perspectives-
Conceptual perspective,
Specification (software) perspective,
Implementation (Software) perspective.
3. Why do we model? There is one fundamental reason.
Unsuccessful software projects fail in their own unique ways, but all successful software
projects are alike in many ways. There are many elements that contribute to a successful
software organization; one common element is the use of modeling.

Modeling is a proven and well-accepted engineering technique. We build architectural


models of houses and high rises to help their users visualize the final product.

4. State the Principles of Modeling


First principle of modeling:

The choice of what models to create has a profound influence on how a problem is
attacked and how a solution is shaped.
Second principle of modeling:

Every model may be expressed at different levels of precision.

Third principle of modeling:

The best models are connected to reality.

Fourth principle of modeling:


No single model is sufficient. Every non-trivial system is best approached through a
small set of nearly independent models.

5. Explain the Object Oriented Modeling


Object-oriented modeling (OOM) is an approach to modeling an application that is
used at the beginning of the software life cycle when using an object-oriented approach to
software development.
6. Unified Modeling Language (UML) is a general purpose modelling language. Explain
the Overview and Conceptual Model of UML
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object oriented analysis
and design. After some standardization, UML has become an OMG standard.
Goals of UML
A picture is worth a thousand words, this idiom absolutely fits describing UML. Object-
oriented concepts were introduced much earlier than UML. At that point of time, there
were no standard methodologies to organize and consolidate the object-oriented
development. It was then that UML came into picture.

A Conceptual Model of UML

 A conceptual model can be defined as a model which is made of concepts and their
relationships.
 A conceptual model is the first step before drawing a UML diagram. It helps to understand
the entities in the real world and how they interact with each other.
As UML describes the real-time systems, it is very important to make a conceptual model and
then proceed gradually. The conceptual model of UML can be mastered by learning the
following three major elements −

 UML building blocks


 Rules to connect the building blocks
 Common mechanisms of UML

7. Discuss the various Building Blocks of the UML:


Things:

 Structural Things
 Behavioral Things
 Grouping Things
 Annotational Things

Relationships:
 Dependency
 Association
 Generalization
 Realization

Diagram:

 Class diagram
 Object diagram
 Use case diagram
 Sequence diagram
 Collaboration diagram
 Activity diagram
 Component diagram
 Deployment diagram

Grouping things:
package

Annotation Things:

Notes

8. Explain the various Relationships in the UML


Relationships:

 Dependency
 Association
 Generalization
 Realization

9. Describe UML Diagrams


Diagram:

a. Class diagram
b. Object diagram
c. Use case diagram
d. Sequence diagram
e. Collaboration diagram
f. Activity diagram
g. Component diagram
h. Deployment diagram
10.Describe in detail the architecture of UML with example. (Or) List out the various
phases of Unified Process.
Inception
Elaboration
Construction
Transition

11.Discuss in detail the Software Development Life Cycle in detail.


12.Distinguish between Aggregations and composition in class diagrams with example?
Ans: The aggregation has a 'Strong-type'. This association signifies that the whole object
can exist without the aggregated object. That means Association with "whole-part"
relationship.
Example: You can take a car, which contains the wheels and some extra parts. Even
though the parts are not there we can call it as car. But in the case of composition, it is a
special type of aggregation it represent weak relationship between "whole-part". In this
case the whole-part is affected when the part within that got affected.

From the above figure, there are three classes Department class,University class and
Professor class. The University can not exist without Department that means it is strong
relationship between them. In other words the lifetime of University depend on the lifetime
of the department class. The second association represents "weak-type" between Department
and professor class. Since department is not depend on the professor this is called as
composition association.
13. Why is a Unified approach to software development necessary? Interpret it.
14. Outline in detail about Object Oriented Modeling Techniques (OMT)
Unit – 2

1. Illustrate and compare Aggregations and composition in class diagrams with a


suitable example?
2. Use the retail system as the given scenario to find out the possible number of
classes those are necessary to build the system. And mention the required
attributes and operations in the class diagram.
3. Define Conceptual class. Rank the 3 strategies to find conceptual class.
4. Give the meaning of abstract conceptual class and Identify the usage of
Description class.
5. Choose the classes required for the banking system and Model a class diagram for
the same by specifying interfaces and roles.
6. Interpret why class diagram is called static object modeling.
7. Discuss about attributes with example.
8. Discuss on
(i) Active Class
(ii) User Defined compartments
(iii) Singleton class
(iv) Interfaces
9. With a suitable example, evaluate and explain how to design a class. Give all
possible representation in a class (such as: name, attribute, visibility, methods,
and responsibilities)
10. Construct design for Library Information System which comprises the following
notations and explain them. (i) Aggregation (ii) Composition (iii)Association
11. (i)Describe the strategies used to identify the conceptual classes. (ii) Mention the
steps to create a domain model used for representing the conceptual classes.
12. A University conducts examinations and the results are announced. Prepare a
report for the following. • Print the marks in the register number order semester
wise for each department • Print the Arrear list semester wise. • Prepare a Rank
list for each department. • Prepare the final aggregate mark list for final year
students. Identify the problem statement and Design and Explain the classes for
each sequence. Design the Use case, Class, and Sequence diagrams for designing
this system.

13. What are the guidelines used to partition the classes in the domain model to be
organized into packages? Explain with suitable examples.

14. Define Package. Mention the three layers of package diagram.


Unit – 3

1. Design the class diagram for Airline Reservation System. Find and draw the
conceptual classes for the same.
2. Design the Class diagram for Hospital management system? Find and draw
conceptual classes for the same?
3. Summarize with an example, how Interaction Diagram are used to model the
dynamic aspects of a system.
4. Express the use of Sequence Diagram. Express the use of Sequence Diagram.
5. Compare sequence diagram and collaboration diagram.
6. State the Purpose of Interaction Diagrams and Where to Use Interaction
Diagrams?

The purpose of interaction diagrams is to visualize the interactive behavior of the


system. Visualizing the interaction is a difficult task. Hence, the solution is to use
different types of models to capture the different aspects of the interaction.
Sequence and collaboration diagrams are used to capture the dynamic nature but from
a different angle.
The purpose of interaction diagram is −
 To capture the dynamic behavior of a system.
 To describe the message flow in the system.
 To describe the structural organization of the objects.
 To describe the interaction among objects.

We have already discussed that interaction diagrams are used to describe the dynamic
nature of a system. Now, we will look into the practical scenarios where these diagrams
are used. To understand the practical application, we need to understand the basic nature
of sequence and collaboration diagram.
The main purpose of both the diagrams are similar as they are used to capture the dynamic
behavior of a system. However, the specific purpose is more important to clarify and
understand.
Sequence diagrams are used to capture the order of messages flowing from one object to
another. Collaboration diagrams are used to describe the structural organization of the
objects taking part in the interaction. A single diagram is not sufficient to describe the
dynamic aspect of an entire system, so a set of diagrams are used to capture it as a whole.
Interaction diagrams are used when we want to understand the message flow and the
structural organization. Message flow means the sequence of control flow from one object
to another. Structural organization means the visual organization of the elements in a
system.
Interaction diagrams can be used −
 To model the flow of control by time sequence.
 To model the flow of control by structural organizations.
 For forward engineering.
 For reverse engineering.

7. List the common notations used in interaction diagram


8. Describe the basic Communication diagram notations.

5. How to Draw an Interaction Diagram? Or write the guide lines to draw the Interaction
Diagram.

6. Draw the Sequence diagram and Collaboration diagram for “Order Management System.

7.Organize and Show the relationship between Interaction and Class diagram with
example.

8.For an ATM system, every user has to be validated with a PIN number to make a
transaction. A customer is allowed 3times to validate card giving the correct PIN
number. Show the Use Case representation for the same and summarize the "Validate
User" Use Case using sequence diagram. Assess and represent the activity diagram for
the same.

9. With an example make use of the notations used in sequence diagram for the
following:

(i) Object destruction

(ii) Frames

(iii)Conditional message

(iv) Mutually exclusive conditional message

(v) Iterations over a collection

Unit_ 4
1.Design the use case diagram for the following specification: A coffee Vending machine
dispenses coffee to customer’s. Customers’ orders coffee by selecting a recipe from a set
of recipe. Customer pay for the coffee using coin. Change is given back. The 'Service
staff ' loads ingredients (coffee powder, milk, sugar, water and chocolate) into the coffee
machine. The service staff can also add a recipe by indicating the name of the coffee, the
units of coffee powder milk, sugar, water and chocolate to be added as well as the cost of
the coffee.

2. A Library lends books and magazines to member, who is registered in the system. It
also maintains the purchase of new books and magazines for the Library. A member can
reserve a book or magazine that is not currently available in the library, so that when it is
returned or purchased by the library, that person is notified. The library can easily create,
replace and delete information about the books, members, and reservation in the system.
The books transactions are stored in the database. The fine list while the member returns
the book after the due date must be generated. Design the use case diagram and discover
the users and actors of this system, and the interactions between them must be depicted.

3. Design and illustrate the use case model for activities involved in ordering food in a
restaurant from the point when the customer enters a restaurant to the point when he
leaves the restaurant.

4.Explain the benefits and concepts of use case and use case model and analyze the
relating use cases fo r ATM system.
5. Analyze the UML activity diagram, using an example point out the features of basic
UML activity diagram notation.
7. When to use activity diagrams.Design and explain the activity diagram for an Online
Purchase System.
8. Represent the activity diagram for the following Scenario, Booking a ticket on Indian
railways e-ticket system
9. For an ATM system, every user has to be validated with a PIN number to make a
transaction. A customer is allowed 3times to validate card giving the correct PIN number.
Show the Use Case representation for the same and summarize the "Validate User" Use
Case using sequence diagram. Assess and represent the activity diagram for the same
10. Interpret about UML state machine diagram and Modeling.
11.Inspect the constructs (notations) used in an activity diagram?
12. What is the purpose of State Chart diagram? Recall how to draw state chart diagram
with an example.
13.Develop and draw the following UML diagrams for Airline Ticket reservation system.
(i) Sequence diagram (booking a ticket). (ii) Activity diagram. (iii) State chart diagram.
14. Mention the purpose of Activity diagram and specify its elements.
UNIT _ 5
1. Define Component. Compare and Contrast Component and Deployment diagram
2. Illustrate about UML Deployment and Component diagram with an example.
3. Identify when to use UML deployment and Component diagrams.
4. Consider the Hospital Management System application with the following
requirement (i) System should handle the in- patient and out-patient information
through receptionist. (ii) Doctors are allowed to view the patient history and give
their prescription. (iii)There should be an Information system to provide the
required information. Give the state chart, Component and Deployment diagram.
5. Consider an elevator that has the basic functions such as moving up and down and
open and close doors and pick up passengers. The elevator is supposed to be used
in a building having floors numbered from 1 to n. There are call buttons in the
elevator corresponding to each floor. For every floor except floors 1 and n, there
are two floor call buttons for the passengers to call elevator for going up and
down. There is only one down call button at floor n and 1 up call button in floor 1.
Then the car stops at a floor, the doors are opened and the elevator light indicating
the current direction the elevator is going is illuminated so that the passengers can
get to know the current moving direction of the elevator. When the elevator is
moving music is audio is played inside the elevator. Draw class diagram, Activity
diagram and component BTL5 Evaluate diagram for designing this system.

You might also like