Unit 5

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

Unit 5

Object Oriented Analysis (OOA):-

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.

Object Oriented Design (OOD):-

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.

2. The Class and Object Layer :


It represents the class hierarchies that enable the system to develop using generalization
and specialization. This layer also represents each object.

3. The Message Layer :


It represents the design details that enable each object to communicate with its partners. It
establishes internal and external interfaces for the system.

4. The Responsibilities Layer :


It represents the data structure and algorithmic design for all the attributes and operations
for each object.
The Object Oriented design pyramid specifically emphasizes specific product or system
design.
In the system analysis or object-oriented analysis phase of software development, the system
requirements are determined, the classes are identified and the relationships among classes are
identified.
The three analysis techniques that are used in conjunction with each other for object-oriented
analysis are object modelling, dynamic modelling, and functional modelling.
Object Modelling

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 −

• Identify objects and group into classes


• Identify the relationships among classes
• Create user object model diagram
• Define user object attributes
• Define the operations that should be performed on the classes
• Review glossary
Dynamic Modelling

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 −

• Identify states of each object


• Identify events and analyze the applicability of actions
• Construct dynamic model diagram, comprising of state transition diagrams
• Express each state in terms of object attributes
• Validate the state–transition diagrams drawn
Functional Modelling

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

The Structured Analysis/Structured Design (SASD) approach is the traditional approach of


software development based upon the waterfall model. The phases of development of a system
using SASD are −

• Feasibility Study
• Requirement Analysis and Specification
• System Design
• Implementation
• Post-implementation Review

Advantages/Disadvantages of Object Oriented Analysis

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.

It can be upgraded from small to large


systems at a greater ease than in systems
following structured analysis.

Advantages/Disadvantages of Structured Analysis

Advantages Disadvantages

As it follows a top-down approach in contrast to In traditional structured analysis


bottom-up approach of object-oriented models, one phase should be
analysis, it can be more easily comprehended completed before the next phase. This
than OOA. poses a problem in design, particularly
if errors crop up or requirements
change.

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.

The two types of Data Modeling Techniques are

1. Entity Relationship (E-R) Model


2. UML (Unified Modelling Language)

Types of Data Models


Types of Data Models: There are mainly three different types of data models: conceptual data
models, logical data models, and physical data models, and each one has a specific purpose.
The data models are used to represent the data and how it is stored in the database and to set
the 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.

Types of Data Model

Conceptual Data Model


A Conceptual Data Model is an organized view of database concepts and their relationships.
The purpose of creating a conceptual data model is to establish entities, their attributes, and
relationships. In this data modeling level, there is hardly any detail available on the actual
database structure. Business stakeholders and data architects typically create a conceptual
data model.

The 3 basic tenants of Conceptual Data Model are

• Entity: A real-world thing


• Attribute: Characteristics or properties of an entity
• Relationship: Dependency or association between two entities

Data model example:


• Customer and Product are two entities. Customer number and name are attributes of the
Customer entity
• Product name and price are attributes of product entity
• Sale is the relationship between the customer and product

Conceptual Data
Model

Characteristics of a conceptual data model

• Offers Organisation-wide coverage of the business concepts.


• This type of Data Models are designed and developed for a business audience.
• The conceptual model is developed independently of hardware specifications like data
storage capacity, location or software specifications like DBMS vendor and technology.
The focus is to represent data as a user will see it in the “real world.”

Conceptual data models known as Domain models create a common vocabulary for all
stakeholders by establishing basic concepts and scope.

Logical Data Model


The Logical Data Model is used to define the structure of data elements and to set
relationships between them. The logical data model adds further information to the conceptual
data model elements. The advantage of using a Logical data model is to provide a foundation to
form the base for the Physical model. However, the modeling structure remains generic.

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


A Physical Data Model describes a database-specific implementation of the data model. It
offers database abstraction and helps generate the schema. This is because of the richness of
meta-data offered by a Physical Data Model. The physical data model also helps in visualizing
database structure by replicating database column keys, constraints, indexes, triggers, and
other RDBMS features.

Physical Data
Model

Characteristics of a 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.

Advantages and Disadvantages of Data Model:


Advantages of Data model:
• The main goal of a designing data model is to make certain that data objects offered by
the functional team are represented accurately.
• The data model should be detailed enough to be used for building the physical
database.
• The information in the data model can be used for defining the relationship between
tables, primary and foreign keys, and stored procedures.
• Data Model helps business to communicate the within and across organizations.
• Data model helps to documents data mappings in ETL process
• Help to recognize correct sources of data to populate the model

Disadvantages of Data model:

• 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.

Consider an organization as an example- manager, product, employee, department etc. can be


taken as an entity.
a. Weak Entity

25.9M

444

Hello Java Program for Beginners

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.

Types of relationship are as follows:

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.

The different terms related to object design are:


1. Objects: All entities involved in the solution design are known as objects. For example,
person, banks, company, and users are considered as objects. Every entity has some
attributes associated with it and has some methods to perform on the attributes.
2. Classes: A class is a generalized description of an object. An object is an instance of a
class. A class defines all the attributes, which an object can have and methods, which
represents the functionality of the object.
3. Messages: Objects communicate by message passing. Messages consist of the integrity
of the target object, the name of the requested operation, and any other action needed to
perform the function. Messages are often implemented as procedure or function calls.
4. Abstraction In object-oriented design, complexity is handled using abstraction.
Abstraction is the removal of the irrelevant and the amplification of the essentials.
5. Encapsulation: Encapsulation is also called an information hiding concept. The data and
operations are linked to a single unit. Encapsulation not only bundles essential information
of an object together but also restricts access to the data and methods from the outside
world.
6. Inheritance: OOD allows similar classes to stack up in a hierarchical manner where the
lower or sub-classes can import, implement, and re-use allowed variables and functions
from their immediate superclasses.This property of OOD is called an inheritance. This
makes it easier to define a specific class and to create generalized classes from specific
ones.
7. Polymorphism: OOD languages provide a mechanism where methods performing
similar tasks but vary in arguments, can be assigned the same name. This is known as
polymorphism, which allows a single interface is performing functions for different types.
Depending upon how the service is invoked, the respective portion of the code gets
executed.

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.

Relation between class and object


A class defines the properties and behavior for the objects represented by the abstraction.
Abstraction is a property of object oriented programming. It denotes the essential properties and
behaviors of an object. It hides code and data. A class thus denotes a category of objects and
act as a blueprint for creating such objects. An object exhibits the property and behaviors
defined by its class. Generally, an object is an instance of a class.

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:

• Smaller components are easier to maintain


• Program can be divided based on functional aspects
• Desired level of abstraction can be brought in the program
• Components with high cohesion can be re-used again
• Concurrent execution can be made possible
• Desired from security aspect
What is UML

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

The UML has the following features:

o It is a generalized modeling language.


o It is distinct from other programming languages like C++, Python, etc.
o It is interrelated to object-oriented analysis and design.
o It is used to visualize the workflow of the system.
o It is a pictorial language, used to generate powerful modeling artifacts.

Conceptual Modeling

Before moving ahead with the concept of UML, we should first understand the basics of the
conceptual model.

A conceptual model is composed of several interrelated concepts. It makes it easy to understand


the objects and how they interact with each other. This is the first step before drawing UML
diagrams.

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy