0% found this document useful (0 votes)
6 views16 pages

Object-Oriented Design Concepts Explained

The document contains a series of questions related to object-oriented design, analysis, and software development methodologies, including RUP and UML. It covers topics such as class diagrams, use case diagrams, metadata, and various complexities in software projects. Additionally, it includes practical exercises for creating diagrams based on specific scenarios like the dining philosopher problem and a bookstore checkout system.

Uploaded by

Santanu Ghosh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views16 pages

Object-Oriented Design Concepts Explained

The document contains a series of questions related to object-oriented design, analysis, and software development methodologies, including RUP and UML. It covers topics such as class diagrams, use case diagrams, metadata, and various complexities in software projects. Additionally, it includes practical exercises for creating diagrams based on specific scenarios like the dining philosopher problem and a bookstore checkout system.

Uploaded by

Santanu Ghosh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

FS: S1-Q1. What is object-oriented design?

Name any two key elements of


object-oriented analysis and design (OOAD)? Name any two types of
complexities software project deal with? What is relative primitive? Why does
each level of hierarchy represent a layer of Abstraction?
(1+(0.5+0.5)+(0.5+0.5)+1+1)

FS: S2-Q1. What is object-oriented analysis? Name any two key elements of
object-oriented analysis and design (OOAD)? Name any two types of
complexities software project deal with? What is relative primitive? Why does
each level of hierarchy represent a layer of Abstraction?
(1+(0.5+0.5)+(0.5+0.5)+1+1)

FS: S3-Q1. Describe the five phases of RUP.


(5)

FS: S4-Q1. Describe the different kinds of attributes in a complex system.


(5)

FS: S5.-Q1. Name the different kinds of hierarchies. Names of different kind
of decomposition used for designing a complex software system. Write two
differences between Inter-component linkages and Intra-component linkages.
What do you mean by common pattern in a complex system?
((0.5+0.5)+(0.5+0.5)+2+1)

FS: S6-Q1. What are the four major elements of an object model? Define
Persistence, Typing and Polymorphism?
((0.5+0.5+0.5+0.5)+(1+1+1))

FS: S7-Q1. Describe any two major elements and any two minor elements of
an object model? What is Inheritance?
((2+2)+1)

SP: S1-Q1. Write two differences between heavy-weight and light weight
concurrency. What is an interface? Describe how persistence talks about
object existence? (2+1+2)

DB3: S1-Q1. What are the four P’s in software development work? Why do we
model? What is a modelling language?
((0.5+0.5+0.5+0.5)+2+1)

DB12: S1-Q1. What is a class? What is UML? Write down the full form of UML.
Why UML is a language for visualizing?
(1+1+1+2)
DB12: S2-Q1. What is object-oriented analysis? Name any two key elements
of object-oriented analysis and design (OOAD)? Define Building blocks of
UML. Define Behavioral things.
(1+(0.5+0.5)+1.5+1.5)

DB12: S3-Q1. What are the four P’s in software development work? Why do
we model? What is a language?
((0.5+0.5+0.5+0.5)+2+1)

DB12: S4-Q1. Describe the five phases of RUP.


(5)

DB12: S5-Q1. Describe the different kind of Relationships.


(5)

FS: S1-Q2. (a) Prepare a class diagram for the dining philosopher problem.
There are 5 philosophers and 5 forks around a circular table. Each
philosopher has access to 2 forks, one on either side. Each fork is shared by
2 philosophers. Each fork may be either on the table or in use by one
philosopher. A philosopher must have 2 forks to eat.

(b) Prepare a class model to describe undirected graphs. An undirected graph


consists of a set of vertices and a set of edges. Edges connect pairs of
vertices. Your model should capture only the structure of graphs (i.e.,
connectivity) and need not be concerned with layout such as location of
vertices or lengths of edges. Cardinality has to be mentioned. Figure shows a
typical undirected graph.

(2+3)

FS: S2-Q2. You are interacting with an online travel agent and encounter the
following use cases. Prepare a use case diagram, using the generalization
and include relationships.

■ Purchase a flight. Reserve a flight and provide payment and address


information.
■ Provide payment information. Provide a credit card to pay for the
incurred charges.

■ Provide address. Provide mailing and residence addresses.

■ Purchase car rental. Reserve a rental car and provide payment and
address information.

■ Purchase a hotel stay. Reserve a hotel room and provide payment and
address information.

■ Make a purchase. Make a travel purchase and provide payment and


address information.

(5)

FS: S3-Q2. What is metadata? Draw a class diagram for the following:

A car model has a model name, year, base price, and a manufacturer. Some
examples of car models are a 1969 Ford Mustang and a 1975 Volkswagen
Rabbit. A physical car has a serial number, color, options, and an owner. As
an example of physical cars, John Doe may own a blue Ford with serial
number 1FABP and a red Volkswagen with serial number 7E81F.

Identify the metadata and data in the above scenario.


(1+3+1)

FS: S4-Q2. What is metadata? Draw a class diagram for the following:

A car model has a model name, year, base price, and a manufacturer. Some
examples of car models are a 1969 Ford Mustang and a 1975 Volkswagen
Rabbit. A physical car has a serial number, color, options, and an owner. As
an example of physical cars, John Doe may own a blue Ford with serial
number 1FABP and a red Volkswagen with serial number 7E81F.

Identify the metadata and data in the above scenario.


(1+3+1)

FS: S5-Q2. Draw a class diagram for the following:

FullTimeIndividualContributor is both FullTimeEmployee and


IndividualContributor and combines their features. FullTimeEmployee and
PartTimeEmployee are disjoint; each employee must belong to exactly one of
these. Similarly, Manager and IndividualContributor are also disjoint and
each employee must be one or the other. (5)

FS: S6-Q2. (a) Prepare a class diagram for a polygon. Explain your
multiplicity decisions. Each point has an x coordinate and a y coordinate.
What is the smallest number of points required to construct a polygon? Does
it make a difference whether or not a point may be shared between
polygons? Your answer should address the fact that points are ordered.

(b) Using your class diagram, prepare an object diagram for two triangles
with a common side under the following condition: A point belongs to exactly
one polygon. (2+3)

FS: S7-Q2. (a) For the below class diagram draw an object diagram, for
person: John, Tom, and Mary working in TCS company, while a person Ravi is
working in IBM.

(b) Construct a class diagram where you should properly use association end
names and not introduce a separate class for each reference.
(3+2)

SP: S1-Q2. The tower of Hanoi is a problem frequently used to teach


recursive programming techniques. The goal is to move a stack of disks from
one of three long pegs to another, using the third peg for maneuvering. Each
disk is a different size. Disks may be moved from the top of a stack on a peg
to the top of the stack on any other peg, one at a time, provided a disk is
never placed on another disk that is smaller than itself. The details of the
algorithm for listing the series of required moves depend on the structure of
the class diagram used. Prepare class diagrams for each of the following
descriptions. Show classes and associations. Do not show attributes or
operations: a. A tower consists of 3 pegs. Each peg has several disks on it, in
a certain order. b. A tower consists of 3 pegs. Disks on the pegs are
organized into subsets called stacks. A stack is an ordered set of disks. Every
disk is in exactly one stack. A peg may have several stacks on it, in order. c.
A tower consists of 3 pegs. Disks on the pegs are organized into subsets
called stacks, as in (b), with several stacks on a peg. However, the structure
of a stack is recursive. A stack consists of one disk (the disk that is physically
on the bottom of the stack) and zero or one stack, depending on the height
of the stack. d. Similar to (c), except only one stack is associated with a peg.
Other stacks on the peg are associated in a linked list.
(5)

DB3: S1-Q2. Categorize the following relationships into generalization,


aggregation, or association. Beware, there may be n-ary associations in the
list, so do not assume every relationship involving three or more classes is a
generalization. Explain your answers.

a. A country has a capital city.

b. A dining philosopher uses a fork.

c. A file is an ordinary file or a directory file.

d. Files contain records.


(5)

DB12: S1-Q2. Categorize the following relationships into generalization,


aggregation, or association. Beware, there may be n-ary associations in the
list, so do not assume every relationship involving three or more classes is a
generalization. Explain your answers.

a. Modems and keyboards are input/output devices.

b. Classes may have several attributes.

c. A person plays for a team in a certain year.

d. A route connects two cities.

e. A student takes a course from a professor.


(5)

DB12: S2-Q2. (a) Prepare a class diagram for the dining philosopher problem.
There are 5 philosophers and 5 forks around a circular table. Each
philosopher has access to 2 forks, one on either side. Each fork is shared by
2 philosophers. Each fork may be either on the table or in use by one
philosopher. A philosopher must have 2 forks to eat.

(b) Prepare a class model to describe undirected graphs. An undirected graph


consists of a set of vertices and a set of edges. Edges connect pairs of
vertices. Your model should capture only the structure of graphs (i.e.,
connectivity) and need not be concerned with layout such as location of
vertices or lengths of edges. Cardinality has to be mentioned. Figure shows a
typical undirected graph.

(2+3)

DB12: S3-Q2. (a) Prepare a class diagram for a polygon. Explain your
multiplicity decisions. Each point has an x coordinate and a y coordinate.
What is the smallest number of points required to construct a polygon? Does
it make a difference whether or not a point may be shared between
polygons? Your answer should address the fact that points are ordered.

(b) Using your class diagram, prepare an object diagram for two triangles
with a common side under the following condition: A point belongs to one or
more polygons. (2+3)

DB12: S4-Q2. Several classes shown have attributes that are really
references to other classes and could be replaced with associations. A person
may have up to three companies as employers. Each person has an ID. A car
is assigned an ID. Cars may be owned by persons, companies, or banks.
Owner ID refers to the ID of the person, company, or bank who owns the car.
A car loan may be involved in the purchase of a car.

Prepare a class diagram without IDs and using association and


generalization. Try to assign multiplicities. Put label or role for association.
You may need to add one or more classes of your own.
(5)

DB12: S5-Q2. What is metadata? Draw a class diagram for the following:

A car model has a model name, year, base price, and a manufacturer. Some
examples of car models are a 1969 Ford Mustang and a 1975 Volkswagen
Rabbit. A physical car has a serial number, color, options, and an owner. As
an example of physical cars, John Doe may own a blue Ford with serial
number 1FABP and a red Volkswagen with serial number 7E81F.

Identify the metadata and data in the above scenario.


(1+3+1)

DB12: S1-Q3: Write code for entire sequence diagram.


DB12: S2-Q3: Write code for the entire sequence diagram:

DB12: S3-Q3: Write code for the entire sequence diagram:


DB12: S4-Q3: Write code for the entire sequence diagram:

DB12: S5-Q3: Write code for the entire sequence diagram:


SP: S1-Q2. Write code for the entire sequence diagram:

FS: S1-Q3: Write code for the entire sequence diagram:


FS: S2-Q3: Write code for the entire sequence diagram:

FS: S3-Q3: Write code for the entire sequence diagram:


FS: S4-Q3: Write code for the entire sequence diagram:
FS: S5-Q3: Write code for the entire sequence diagram:

FS: S6-Q3: Write code for the entire sequence diagram:

FS: S7-Q3: Write code for the entire sequence diagram:


FS: S8-Q3: Write code for the entire sequence diagram:

FS: S9-Q3: Write code for the entire sequence diagram:

Question – 4
Draw a Use Case Diagram for a physical bookstore checkout system
based on the description below.

1. Actors:

o Customer: A person who initiates the purchase of an item.

o Cashier: An employee who checks out purchases at a cash


register.

o Payment Verifier: The remote system that approves use of a


credit or debit card.

2. Use Cases:

o Purchase Items: A customer brings one or more items to the


checkout register and pays for the items.

o Return Items: The customer returns items that were previously


purchased and gets a refund.

3. System:

o The system is called Bookstore Checkout System.

++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++

Draw a use case diagram for the following:

b. There are two actors:

■ Customer. A person who initiates the purchase of gas.

■ Cashier. A person who handles manual credit card payments and monitors
the sale of gas.

c. There are four use cases:

■ Purchase gas. Obtain gas from the electronic gas pump and pay for it
with cash.

■ Purchase car wash. A customer also decides to purchase a car wash and
pays for it with

cash.
■ Pay credit card outside. Instead of cash, pay for the gas and optional car
wash with a credit

card that is directly handled by the gas system.

■ Pay credit card inside. Instead of cash, pay for the gas and optional car
wash with a credit

card that is manually handled by the cashier.

You might also like