ooad-sem-ooad-important-questions-for-sem
ooad-sem-ooad-important-questions-for-sem
Unit-1
1. Define the structure of Complex Systems? Explain the five
attributes of a complex system in detail.
7.Write and explain the Limitations of the Human Capacity when Dealing
with Complexity.
1.
2.
3,4.
5.
6.
7.
Unit-2
1. What is the importance of modeling in object oriented and explain
modeling principles.
2. Describe the various elements of the Object model in detail. 3.
Define modeling. Why do we model? What we can achieve through
modeling
4. Discuss clearly about the Modeling a System’s Architecture with a neat
sketch.
5. With a neat sketch, describe
Downloaded theVirijala
by Lakshman activities of the different phases of the
([email protected])
lOMoARcPSD|26902515
Minor Elements − By minor, it is meant that these elements are useful, but not
indispensable part of the object model. The three minor elements are −
Downloaded by Lakshman Virijala ([email protected])
lOMoARcPSD|26902515
Typing
Concurrency
Persistence
Abstraction
Abstraction means to focus on the essential features of an element or object in
OOP, ignoring its extraneous or accidental properties. The essential features are
relative to the context in which the object is being used.
Grady Booch has defined abstraction as follows −
“An abstraction denotes the essential characteristics of an object that distinguish
it from all other kinds of objects and thus provide crisply defined conceptual
boundaries, relative to the perspective of the viewer.”
Example − When a class Student is designed, the attributes enrolment_number,
name, course, and address are included while characteristics like pulse_rate and
size_of_shoe are eliminated, since they are irrelevant in the perspective of the
educational institution.
Encapsulation
Encapsulation is the process of binding both attributes and methods together
within a class. Through encapsulation, the internal details of a class can be
hidden from outside. The class has methods that provide user interfaces by
which the services provided by the class may be used.
Modularity
Modularity is the process of decomposing a problem (program) into a set of
modules so as to reduce the overall complexity of the problem. Booch has
defined modularity as −
“Modularity is the property of a system that has been decomposed into a set of
cohesive and loosely coupled modules.”
Modularity is intrinsically linked with encapsulation. Modularity can be
visualized as a way of mapping encapsulated abstractions into real, physical
modules having high cohesion within the modules and their inter–module
interaction or coupling is low.
Downloaded by Lakshman Virijala ([email protected])
lOMoARcPSD|26902515
Hierarchy
In Grady Booch’s words, “Hierarchy is the ranking or ordering of abstraction”.
Through hierarchy, a system can be made up of interrelated subsystems, which
can have their own subsystems and so on until the smallest level components
are reached. It uses the principle of “divide and conquer”. Hierarchy allows code
reusability.
The two types of hierarchies in OOA are −
“IS–A” hierarchy − It defines the hierarchical relationship in
inheritance, whereby from a super-class, a number of subclasses
may be derived which may again have subclasses and so on. For
example, if we derive a class Rose from a class Flower, we can say
that a rose “is–a” flower.
“PART–OF” hierarchy − It defines the hierarchical relationship in
aggregation by which a class may be composed of other classes. For
example, a flower is composed of sepals, petals, stamens, and
carpel. It can be said that a petal is a “part–of” flower.
Typing
According to the theories of abstract data type, a type is a characterization of a
set of elements. In OOP, a class is visualized as a type having properties distinct
from any other types. Typing is the enforcement of the notion that an object is an
instance of a single class or type. It also enforces that objects of different types
may not be generally interchanged; and can be interchanged only in a very
restricted manner if absolutely required to do so.
The two types of typing are −
Strong Typing − Here, the operation on an object is checked at the
time of compilation, as in the programming language Eiffel.
Weak Typing − Here, messages may be sent to any class. The
operation is checked only at the time of execution, as in the
programming language Smalltalk.
Concurrency
Downloaded by Lakshman Virijala ([email protected])
lOMoARcPSD|26902515
3. Design: Models play a crucial role in the design phase of OOAD. They
assist in architecting the system's structure and behavior. Class diagrams
help define the classes and their relationships, while sequence diagrams
illustrate the flow of interactions between objects. These models guide the
software design process, ensuring that the system is modular,
maintainable, and extensible.
Visualization
Reduction of complexity
Types of Models:
There are 3 types of models in the object oriented modeling and design are:
Class Model, State Model, and Interaction Model. These are explained as
following below.
1. Class Model:
The class model shows all the classes present in the system. The
class model shows the attributes and the behavior associated with
the objects.
2. State Model:
State model describes those aspects of objects concerned with time and the
Downloaded by Lakshman Virijala ([email protected])
lOMoARcPSD|26902515
sequencing of operations – events that mark changes, states that define the
context for events, and the organization of events and states.Actions and events
3. Interaction Model:
Interaction model is used to show the various interactions between objects, how
the objects collaborate to achieve the behavior of the system as a whole. The
following diagrams are used to show the interaction model:
2. System Design:
- This phase focuses on designing the system's architecture and defining its
structure, interfaces, and behavior.
- The design phase translates the requirements into a blueprint for the system's
implementation.
- Activities include creating high-level and detailed designs, developing data
models and class diagrams, specifying system interfaces, and creating
prototypes or mock-ups.
It's important to note that different SDLC models (e.g., Waterfall, Agile,
Spiral) may have variations in the specific phases and their order. However,
the key objective of the SDLC is to provide a systematic and structured
approach to developing and maintaining software systems, ensuring that they
meet user needs, quality standards, and project constraints.
8.UML Class Diagram
The class diagram depicts a static view of an application. It represents the types of
objects residing in the system and the relationships between them. A class consists of
its objects, and also it may inherit from other classes. A class diagram is used to
visualize, describe, document various different aspects of the system, and also
construct executable software code.
It shows the attributes, classes, functions, and relationships to give an overview of the
software system. It constitutes class names, attributes, and functions in a separate
compartment that helps in software development. Since it is a collection of classes,
interfaces, associations, collaborations, and constraints, it is termed as a structural
diagram.
○ Upper Section: The upper section encompasses the name of the class. A class is
a representation of similar objects that shares the same relationships, attributes,
operations, and semantics. Some of the following rules that should be taken into
account while representing a class are given below:
○ Middle Section: The middle section constitutes the attributes, which describe the
quality of the class. The attributes have the following characteristics:
a. The attributes are written along with its visibility factors, which are public
(+), private (-), protected (#), and package (~).
○ Lower Section: The lower section contain methods or operations. The methods
are represented in the form of a list, where each method is written in a single line.
It demonstrates how a class interacts with data.
Overall, UML plays a vital role in the software development process by providing a
common language and notation for modeling and communication. It enables
stakeholders to share a common understanding of the system, facilitates effective
analysis and design, and promotes better collaboration and documentation throughout
the software development lifecycle.
10.
11.
12.
13.
REFER 9
14.
15.
Unit-3
1. What is a nature of Class and Object? How to
There are many differences between object and class. Some differences
Class Object
class Student {
public:
void put(){
Syntax: Declaring Class in C++ is as
follows: cout<<“Function
Downloaded by Lakshman Virijala ([email protected])
lOMoARcPSD|26902515
}
s1.put();
int main(){
Example:Ducati, Suzuki,
Example:Bike Kawasaki
3.
I: P1:
S: P: S1: H1:
4.
i) Class: A class is a blueprint or a template that defines the properties
(attributes) and behaviors (operations) of a particular type of object. It
represents a category or a set of objects that share common
characteristics. ForDownloaded
example, a class
by Lakshman called
Virijala "Car" can define attributes like
([email protected])
lOMoARcPSD|26902515