Unit 5
Unit 5
Unit 5
Object Oriented Analysis (OOA) is the first technical activity performed as part of object oriented
software engineering. OOA introduces new concepts to investigate a problem. It is based in a
set of basic principles, which are as follows-
1. The information domain is modeled.
2. Behavior is represented.
3. Function is described.
4. Data, functional, and behavioral models are divided to uncover greater detail.
5. Early models represent the essence of the problem, while later ones provide
implementation
details.
An analysis model created using object oriented analysis is transformed by object oriented
design into a design model that works as a plan for software creation. OOD results in a design
having several different levels of modularity i.e., The major system components are partitioned
into subsystems (a system level “modular”), and data their manipulation operations are
encapsulated into objects (a modular form that is the building block of an OO system.).
OOD must specify some data organization of attributes and a procedural description of each
operation.
Shows a design pyramid for object oriented systems. It is having the following four layers.
1. The Subsystem Layer :
It represents the subsystem that enables software to achieve user requirements and
implement technical frameworks that meet user needs.
Object modelling develops the static structure of the software system in terms of objects. It
identifies the objects, the classes into which the objects can be grouped into and the relationships
between the objects. It also identifies the main attributes and operations that characterize each
class.
The process of object modelling can be visualized in the following steps −
After the static behavior of the system is analyzed, its behavior with respect to time and external
changes needs to be examined. This is the purpose of dynamic modelling.
Dynamic Modelling can be defined as “a way of describing how an individual object responds to
events, either internal events triggered by other objects, or external events triggered by the
outside world”.
The process of dynamic modelling can be visualized in the following steps −
Functional Modelling is the final component of object-oriented analysis. The functional model
shows the processes that are performed within an object and how the data changes as it moves
between methods. It specifies the meaning of the operations of object modelling and the actions
of dynamic modelling. The functional model corresponds to the data flow diagram of traditional
structured analysis.
The process of functional modelling can be visualized in the following steps −
• Identify all the inputs and outputs
• Construct data flow diagrams showing functional dependencies
• State the purpose of each function
• Identify constraints
• Specify optimization criteria
•
Structured Analysis vs. Object Oriented Analysis
• Feasibility Study
• Requirement Analysis and Specification
• System Design
• Implementation
• Post-implementation Review
Advantages Disadvantages
Focuses on data rather than the Functionality is restricted within objects. This
procedures as in Structured Analysis. may pose a problem for systems which are
intrinsically procedural or computational in
nature.
The principles of encapsulation and data It cannot identify which objects would
hiding help the developer to develop generate an optimal system design.
systems that cannot be tampered by other
parts of the system.
The principles of encapsulation and data The object-oriented models do not easily
hiding help the developer to develop show the communications between the
systems that cannot be tampered by other objects in the system.
parts of the system.
It allows effective management of software All the interfaces between the objects cannot
complexity by the virtue of modularity. be represented in a single diagram.
Advantages Disadvantages
It is based upon functionality. The overall The initial cost of constructing the
purpose is identified and then functional system is high, since the whole system
decomposition is done for developing the needs to be designed at once leaving
software. The emphasis not only gives a better very little option to add functionality
later.
understanding of the system but also generates
more complete systems.
The specifications in it are written in simple It does not support reusability of code.
English language, and hence can be more So, the time and cost of development is
easily analyzed by non-technical personnel. inherently high.
Data Modelling:- Data modeling (data modelling) is the process of creating a data model for
the data to be stored in a database. This data model is a conceptual representation of Data
objects, the associations between different data objects, and the rules.
Data modeling helps in the visual representation of data and enforces business rules, regulatory
compliances, and government policies on the data. Data Models ensure consistency in naming
conventions, default values, semantics, security while ensuring quality of the data.
Data Model
The Data Model is defined as an abstract model that organizes data description, data
semantics, and consistency constraints of data. The data model emphasizes on what data is
needed and how it should be organized instead of what operations will be performed on data.
Data Model is like an architect’s building plan, which helps to build conceptual models and set a
relationship between data items.
1. Conceptual Data Model: This Data Model defines WHAT the system contains. This
model is typically created by Business stakeholders and Data Architects. The purpose is
to organize, scope and define business concepts and rules.
2. Logical Data Model: Defines HOW the system should be implemented regardless of
the DBMS. This model is typically created by Data Architects and Business Analysts.
The purpose is to developed technical map of rules and data structures.
3. Physical Data Model: This Data Model describes HOW the system will be implemented
using a specific DBMS system. This model is typically created by DBA and developers.
The purpose is actual implementation of the database.
Conceptual Data
Model
Conceptual data models known as Domain models create a common vocabulary for all
stakeholders by establishing basic concepts and scope.
Logical Data
Model
At this Data Modeling level, no primary or secondary key is defined. At this Data modeling level,
you need to verify and adjust the connector details that were set earlier for relationships.
Characteristics of a Logical data model
• Describes data needs for a single project but could integrate with other logical data
models based on the scope of the project.
• Designed and developed independently from the DBMS.
• Data attributes will have datatypes with exact precisions and length.
Physical Data
Model
• The physical data model describes data need for a single project or application though it
maybe integrated with other physical data models based on project scope.
• Data Model contains relationships between tables that which addresses cardinality and
nullability of the relationships.
• Developed for a specific version of a DBMS, location, data storage or technology to be
used in the project.
• Columns should have exact datatypes, lengths assigned and default values.
• Primary and Foreign keys, views, indexes, access profiles, and authorizations, etc. are
defined.
• To develop Data model one should know physical data stored characteristics.
• This is a navigational system produces complex application development, management.
Thus, it requires a knowledge of the biographical truth.
• Even smaller change made in structure require modification in the entire application.
• There is no set data manipulation language in DBMS.
ER model
o ER model stands for an Entity-Relationship model. It is a high-level data model. This model
is used to define the data elements and relationship for a specified system.
o It develops a conceptual design for the database. It also develops a very simple and easy
to design view of data.
o In ER modeling, the database structure is portrayed as a diagram called an entity-
relationship diagram.
For example, Suppose we design a school database. In this database, the student will be an
entity with attributes like address, name, id, age, etc. The address can be another entity with
attributes like city, street name, pin code, etc and there will be a relationship between them.
Component of ER Diagram
1. Entity:
An entity may be any object, class, person or place. In the ER diagram, an entity can be
represented as rectangles.
25.9M
444
An entity that depends on another entity called a weak entity. The weak entity doesn't contain any
key attribute of its own. The weak entity is represented by a double rectangle.
2. Attribute
The attribute is used to describe the property of an entity. Eclipse is used to represent an attribute.
For example, id, age, contact number, name, etc. can be attributes of a student.
a. Key Attribute
The key attribute is used to represent the main characteristics of an entity. It represents a primary
key. The key attribute is represented by an ellipse with the text underlined.
b. Composite Attribute
An attribute that composed of many other attributes is known as a composite attribute. The
composite attribute is represented by an ellipse, and those ellipses are connected with an ellipse.
c. Multivalued Attribute
An attribute can have more than one value. These attributes are known as a multivalued attribute.
The double oval is used to represent multivalued attribute.
For example, a student can have more than one phone number.
d. Derived Attribute
An attribute that can be derived from other attribute is known as a derived attribute. It can be
represented by a dashed ellipse.
For example, A person's age changes over time and can be derived from another attribute like
Date of birth.
3. Relationship
A relationship is used to describe the relation between entities. Diamond or rhombus is used to
represent the relationship.
a. One-to-One Relationship
When only one instance of an entity is associated with the relationship, then it is known as one to
one relationship.
For example, A female can marry to one male, and a male can marry to one female.
b. One-to-many relationship
When only one instance of the entity on the left, and more than one instance of an entity on the
right associates with the relationship then this is known as a one-to-many relationship.
For example, Scientist can invent many inventions, but the invention is done by the only specific
scientist.
c. Many-to-one relationship
When more than one instance of the entity on the left, and only one instance of an entity on the
right associates with the relationship then it is known as a many-to-one relationship.
For example, Student enrolls for only one course, but a course can have many students.
d. Many-to-many relationship
When more than one instance of the entity on the left, and more than one instance of an entity on
the right associates with the relationship then it is known as a many-to-many relationship.
For example, Employee can assign by many projects and project can have many employees.
Object-Oriented Design
In the object-oriented design method, the system is viewed as a collection of objects (i.e., entities).
The state is distributed among the objects, and each object handles its state data. For example,
in a Library Automation Software, each library representative may be a separate object with its
data and functions to operate on these data. The tasks defined for one purpose cannot refer or
change data of other objects. Objects have their internal data which represent their state. Similar
objects create a class. In other words, each object is a member of some class. Classes may
inherit features from the superclass.
OO design concept
• Object Oriented is a popular design approach for analyzing and designing an application.
• Most of the languages like C++, Java, .net are use object oriented design concept.
• Object-oriented concepts are used in the design methods such as classes, objects,
polymorphism, encapsulation, inheritance, dynamic binding, information hiding, interface,
constructor, and destructor.
• The main advantage of object oriented design is that improving the software development and
maintainability.
• Another advantage is that faster and low cost development, and creates a high quality
software.
• The disadvantage of the object-oriented design is that larger program size and it is not suitable
for all types of program.
Modularization
Modularization is a technique to divide a software system into multiple discrete and independent
modules, which are expected to be capable of carrying out task(s) independently. These
modules may work as basic constructs for the entire software. Designers tend to design modules
such that they can be executed and/or compiled separately and independently.
Modular design unintentionally follows the rules of ‘divide and conquer’ problem-solving strategy
this is because there are many other benefits attached with the modular design of a software.
Advantage of modularization:
The UML stands for Unified modeling language, is a standardized general-purpose visual
modeling language in the field of Software Engineering. It is used for specifying, visualizing,
constructing, and documenting the primary artifacts of the software system. It helps in designing
and characterizing, especially those software systems that incorporate the concept of Object
orientation. It describes the working of both the software and hardware systems.
Goals of UML
o Since it is a general-purpose modeling language, it can be utilized by all the modelers.
o UML came into existence after the introduction of object-oriented concepts to systemize
and consolidate the object-oriented development, due to the absence of standard methods
at that time.
o The UML diagrams are made for business users, developers, ordinary people, or anyone
who is looking forward to understand the system, such that the system can be software or
non-software.
o Thus it can be concluded that the UML is a simple modeling approach that is used to
model all the practical systems.
Characteristics of UML
Conceptual Modeling
Before moving ahead with the concept of UML, we should first understand the basics of the
conceptual model.
Following are some object-oriented concepts that are needed to begin with UML:
o Object: An object is a real world entity. There are many objects present within a single
system. It is a fundamental building block of UML.
o Class: A class is a software blueprint for objects, which means that it defines the variables
and methods common to all the objects of a particular type.
o Abstraction: Abstraction is the process of portraying the essential characteristics of an
object to the users while hiding the irrelevant information. Basically, it is used to envision
the functioning of an object.
o Inheritance: Inheritance is the process of deriving a new class from the existing ones.
o Polymorphism: It is a mechanism of representing objects having multiple forms used for
different purposes.
o Encapsulation: It binds the data and the object together as a single unit, enabling tight
coupling between them.