6 Hanouts1
6 Hanouts1
LECTURE HANDOUTS
L-1
CSE III / VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Introduction :
Virtual Reality (VR) is an immersive technology that creates a simulated environment, allowing users to
experience and interact with a 3D world as if they were physically present in it. This technology typically
involves the use of VR headsets, which display the virtual environment and track the user's head and hand
movements, providing a sense of depth and presence.
Programming Languages: Knowledge of languages like C#, C++, or Python is crucial, as these are often used
for VR development.
Basic Programming Concepts: Understanding fundamental concepts such as variables, loops, conditionals, and
functions.
2. 3D Graphics Fundamentals
Head-Mounted Displays (HMDs): Understanding different types of VR headsets, their specifications, and how
they work.
Motion Controllers: Knowledge about how VR controllers track user input and interact with the virtual
environment.
Tracking Systems: Familiarity with how tracking systems capture and translate user movements into the VR
world.
Game Engines: Proficiency with game engines like Unity or Unreal Engine, which are commonly used for
creating VR applications.
VR SDKs and APIs: Knowledge of VR Software Development Kits (SDKs) and Application Programming
Interfaces (APIs) such as Oculus SDK, SteamVR, or OpenXR.
Gaming: Offers highly immersive gaming experiences where players can explore virtual worlds and
interact with them in real-time.
Education and Training: Provides simulations for training in fields such as medicine, aviation, and
military, allowing users to practice skills in a safe and controlled environment.
Healthcare: Used for therapy and rehabilitation, helping patients with conditions like PTSD, phobias,
or motor impairments through tailored virtual experiences.
Design and Architecture: Allows designers and architects to visualize and interact with their projects
before they are built, facilitating better planning and decision-making.
Social Interaction: Platforms like VR chat rooms enable people to meet and interact in virtual spaces,
bridging distances and creating new forms of social engagement.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University)
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS L -2
CSE III / VI
Course Code & Name 21CSE17&VIRTUAL REALITY
Real-time computer graphics in Virtual Reality (VR) refers to the process of generating and rendering images
at a speed that matches or exceeds the frame rate of the VR headset, providing a smooth and immersive
experience.
1. Real-Time Rendering
Real-time rendering involves generating images from 3D models and scenes at a rate that maintains fluid
motion. This is critical for VR because any lag or stutter can break immersion and potentially cause motion
sickness. Key considerations include:
Frame Rate: VR typically requires high frame rates (e.g., 90Hz or higher) to ensure smooth visuals
and reduce the risk of motion sickness. Each frame must be rendered quickly to keep up with user
movements and interactions.
Latency: Low latency is essential in VR. The system needs to respond to user inputs and movements
with minimal delay to maintain a natural and immersive experience.
2.VR-Specific Rendering Techniques
Stereoscopic Rendering: In VR, two images are rendered simultaneously, one for each eye, to create a
sense of depth. This requires rendering the scene from slightly different viewpoints and ensuring
synchronization.
Foveated Rendering: This technique improves performance by rendering high detail only in the area
where the user is looking (the foveal region) and lower detail in peripheral vision. This approach
reduces the rendering workload and improves frame rates.
Asynchronous Reprojection: This technique helps maintain a stable frame rate by compensating for
minor drops in performance. It allows the VR system to use the most recent frame data to interpolate
missing frames, reducing perceived latency.
3. Performance Optimization
Optimizing performance is critical for maintaining high frame rates and low latency:
Level of Detail (LOD): Adjusting the complexity of 3D models based on their distance from the
viewer. Objects further away can be rendered with less detail, reducing computational load.
Culling: Techniques to avoid rendering objects that are not visible to the user. Frustum culling, for
instance, removes objects outside the camera’s view frustum, while occlusion culling ignores objects
blocked by other objects.
Asset Optimization: Reducing the complexity and size of textures and models to ensure faster
rendering. This can include techniques like texture atlasing, where multiple textures are combined into
a single image
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University)
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu L-3
LECTURE HANDOUTS
CSE III/VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Name of the Faculty:
Introduction :
To create and experience Virtual Reality (VR), several requirements must be met, spanning hardware, software,
and human factors.
Prerequisite knowledge for Complete understanding and learning of Topic:
Hardware Requirements
Software Requirements
Head-Mounted Display (HMD): The primary device for VR, which provides the visual and often
auditory components of the experience. Popular models include the Oculus Quest, HTC Vive, and
Meta Quest.
Motion Controllers: Handheld devices that track user movements and allow interaction within the
virtual environment. Examples include the Oculus Touch controllers and HTC Vive controllers.
Tracking Sensors: Devices that track the user’s movements within the VR space. This may include
external sensors (like those used with the HTC Vive) or internal tracking systems within the HMD (as
with the Oculus Quest).
Powerful PC or Console: High-performance computers or consoles may be required for VR systems
that are not standalone. These systems need to meet the specifications for processing power, graphics
capabilities, and memory. Examples include a gaming PC with a powerful GPU or consoles like
PlayStation VR.
Connectivity: For VR systems that require external hardware, such as sensors or PCs, a reliable
connection (USB, HDMI, or DisplayPort) is necessary.
Software Requirements
VR Platforms and SDKs: Software Development Kits (SDKs) and platforms that facilitate the
creation and integration of VR content. Examples include Unity and Unreal Engine for
development, and SDKs like Oculus SDK and SteamVR for interfacing with VR hardware.
Content and Applications: VR requires specific applications and content designed for VR
environments, such as games, simulations, or educational programs.
Drivers and Firmware: Up-to-date drivers and firmware for VR hardware to ensure
compatibility and performance.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University)
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu L-4
LECTURE HANDOUTS
CSE III/VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Introduction :
3D computer graphics involve creating and manipulating visual content that appears to have three dimensions
—depth, width, and height. Unlike 2D graphics, which are flat and lack depth, 3D graphics provide a sense of
realism and spatial awareness, making them essential in various fields, including video games, movies,
simulations, and virtual reality.
Modeling: The process of creating 3D objects using geometric shapes. Techniques include polygonal
modeling, NURBS (Non-Uniform Rational B-Splines), and procedural generation.
Rendering: The process of generating an image from a 3D model. This involves converting 3D data into
2D images through techniques like rasterization and ray tracing.
Texturing: Applying textures to 3D models to add detail and realism. This includes creating and mapping
2D images onto 3D surfaces.
Shading: Calculating the color and brightness of surfaces based on lighting conditions. Techniques
include flat shading, Gouraud shading, and Phong shading.
Lighting: Simulating light sources within a scene to illuminate 3D objects. Types of lighting include
ambient, directional, point, and spotlights.
Animation: Creating movement in 3D models by defining keyframes and using techniques such as
rigging and inverse kinematics.
Simulation: The process of mimicking real-world physical phenomena in 3D environments, such as fluid
dynamics, cloth simulation, and particle systems.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University)
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu L-5
LECTURE HANDOUTS
CSE III/VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Introduction :
Virtual world space refers to the conceptual and technical environment where digital simulations, games,
and applications occur. It’s an artificial space created and managed by computer systems where users
interact with three-dimensional objects, environments, and other users. This virtual space is defined and
manipulated using various technologies and methodologies to create a believable and functional simulated
experience.
Prerequisite knowledge for Complete understanding and learning of Topic:
Virtual Coordinates
Scale and Units
World Boundaries and Limits
Navigation and Movement
Detailed content of the Lecture:
Virtual world space refers to the conceptual and technical environment where digital simulations, games, and
applications occur. It’s an artificial space created and managed by computer systems where users interact with
three-dimensional objects, environments, and other users. This virtual space is defined and manipulated using
various technologies and methodologies to create a believable and functional simulated experience.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University)
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu L-6
LECTURE HANDOUTS
CSE III/VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Introduction :
Perspective projection is a technique in computer graphics used to create a sense of depth and realism in 3D
environments by mimicking how the human eye perceives the world. This projection method transforms 3D points
in space onto a 2D plane (such as a computer screen) in a way that reflects how objects appear smaller as they get
further away, converging towards a point in the distance.
Vanishing Points: Lines parallel in 3D space converge towards one or more vanishing points on the 2D
plane. For example, railway tracks appear to meet at a single point on the horizon as they extend into the
distance.
Depth Perception: Objects appear smaller as they move further from the viewer, creating a realistic sense
of depth. This is achieved by mapping objects based on their distance from the viewer.
Field of View (FOV): The angle of the viewable area in the projection, typically controlled by the camera’s
lens. A wider FOV allows for more of the scene to be visible, while a narrower FOV focuses on a smaller
portion of the scene.
Camera Model: In computer graphics, the perspective projection can be represented by a pinhole camera
model, where light rays pass through a single point (the pinhole) and project onto a flat surface (the image
plane).
CSE III / VI
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-7
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
Introduction :
3D clipping is a process in computer graphics used to manage and render only the visible parts of 3D
objects, which helps in optimizing performance and ensuring that the rendering process is efficient. The
primary goal of clipping is to eliminate parts of objects that are outside the viewable area of the scene or
are not visible to the camera.
Prerequisite knowledge for Complete understanding and learning of Topic:
View Frustum Clipping
Back-Face Culling
Occlusion Culling
Frustum Culling
Detailed content of the Lecture:
Types of 3D Clipping
Back-Face Culling:
o Definition: This technique involves removing faces of objects that are facing away from the
camera, as they are not visible.
o Process: The orientation of each face is checked, and those with normals pointing away from the
camera are omitted from the rendering process.
Occlusion Culling:
o Definition: This technique eliminates objects that are blocked by other objects from being
rendered.
o Process: Visibility algorithms determine which objects are hidden behind others and only render
the visible ones.
Frustum Culling:
o Definition: This is a form of view frustum clipping that specifically involves determining which
objects or parts of objects are within the view frustum.
o Process: Objects are tested against the view frustum to determine if they are within the visible
region.
Colour Theory
Colour theory in computer graphics is the study of how colors interact and how they can be used
effectively to create visual effects, convey information, and enhance realism in 3D environments.
1. Color Models
o Definition: The CMYK color model is used in color printing and is based on the subtractive
color mixing of cyan, magenta, yellow, and black inks.
o Application: It’s not typically used for screen-based displays but is crucial for printing
processes.
o Definition: The HSV model represents color in terms of hue (color type), saturation (color
intensity), and value (brightness).
o Application: Useful for designing color schemes and adjusting colors intuitively based on their
perceptual characteristics.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-8
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Ambient Lighting:
o Definition: Represents the constant, uniform light that is scattered in all directions and affects all
surfaces equally, regardless of their orientation.
o Application: Provides a base level of illumination to ensure no part of the scene is completely
dark.
Diffuse Lighting:
o Definition: Simulates light that is scattered uniformly across a surface, with intensity depending
on the angle between the light source and the surface normal.
o Calculation: Often modeled using Lambert’s cosine law, where the intensity is proportional to the
cosine of the angle between the light direction and the surface normal.
o Application: Adds depth and texture to surfaces, making them look more realistic by simulating
how light is scattered when hitting rough surfaces.
Specular Lighting:
o Definition: Simulates the bright spots or highlights on surfaces that occur when light reflects
directly into the viewer’s eye.
o Calculation: Often modeled using the Phong reflection model, which calculates specular
reflection based on the angle between the viewer’s direction and the reflection of the light
direction on the surface.
o Application: Adds realism to shiny or glossy surfaces by creating highlights and reflections.
where III is the total illumination, IaI_aIa is the ambient light intensity, IdI_dId is the diffuse light
intensity, IsI_sIs is the specular light intensity, KaK_aKa, KdK_dKd, and KsK_sKs are the material
properties, L\mathbf{L}L is the light direction, N\mathbf{N}N is the surface normal, R\mathbf{R}R is
the reflection direction, V\mathbf{V}V is the viewer direction, and nnn is the shininess exponent.
Application: Widely used for its balance of simplicity and realism in simulating surface illumination.
Reflection Models
Reflection models describe how light bounces off surfaces and contributes to the appearance of materials
in a 3D scene. They are essential for creating realistic reflections and surface properties.
1. Reflection Types
Diffuse Reflection:
o Definition: Light is scattered equally in all directions from a rough surface.
o Model: Often modeled using Lambert's cosine law, which is already included in basic illumination
models like Phong.
Specular Reflection:
o Definition: Light reflects in a specific direction, creating highlights on shiny surfaces.
o Model: Simulated using the Phong or Blinn-Phong models, which calculate the intensity based on
the reflection direction and viewer angle.
Mirror Reflection:
o Definition: Light reflects off smooth, shiny surfaces in a predictable manner, like a mirror.
o Model: Implemented using reflection techniques that simulate the exact angle of incidence equals
the angle of reflection.
Environment Mapping:
o Definition: Simulates reflections of the surrounding environment on reflective surfaces.
o Techniques:
Cubemaps: Use a cube map texture to provide environment reflections. Each face of the
cube map represents a different direction in the environment.
Sphere Mapping: Uses a spherical texture to simulate reflections on curved surfaces.
Video Content / Details of website for further learning (if any):
https://www.youtube.com/watch?v=3bfJ5AORAjQ
Important Books/Journals for further learning including the page nos.:
Martin Fowler, UML Distilled, PHI/Pearson Education,2007[89-95]
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -9
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Code & Name : 21CSE17&VIRTUAL REALITY
Introduction :
Hidden-surface removal is a critical process in computer graphics used to determine which surfaces of 3D
objects are visible in a rendered scene and which are obscured by other objects. This process ensures that only
the surfaces that are visible to the viewer are displayed, enhancing realism and efficiency. .
Painter’s Algorithm:
o Definition: The painter’s algorithm renders objects in the order of their distance from the camera, with
farthest objects drawn first.
o Process: Objects are sorted based on their depth, and then drawn from back to front. Overlapping
objects are managed by drawing the farther objects first, allowing nearer objects to obscure them.
o Challenges: Requires sorting of objects and may struggle with complex scenes or intersecting
geometries.
Scanline Algorithm:
o Definition: This technique processes the image one horizontal scanline at a time, determining visible
surfaces for each scanline.
o Process: For each scanline, the algorithm determines which surfaces are visible by comparing depth
values and then updates the frame buffer accordingly.
o Advantages: Can be efficient for scenes with many horizontal surfaces but may be complex for scenes
with varying object shapes and intersections.
Ray Casting:
o Definition: Ray casting involves shooting rays from the camera into the scene and determining the
closest intersection point of each ray with objects in the scene.
o Process: Each pixel corresponds to a ray, and the closest object intersected by the ray determines the
color of the pixel.
o Advantages: Useful for rendering complex scenes and handling transparency. Forms the basis for more
advanced techniques like ray tracing.
Realism in VR
Realism in VR involves creating immersive and believable experiences that closely mimic real-world physics,
lighting, and interactions. Achieving realism is essential for enhancing user engagement and providing a
convincing virtual environment.
Visual Realism:
o Lighting and Shading: Accurate lighting and shading models (e.g., Phong, Cook-Torrance) simulate
how light interacts with surfaces, creating realistic textures and highlights.
o Textures and Materials: Detailed textures and physically-based materials replicate real-world surface
properties, such as roughness and reflectivity.
Physical Realism:
o Physics Simulations: Accurate simulations of physical behaviors, such as gravity, collisions, and
object interactions, enhance the realism of movement and object behavior in the virtual environment.
o Environmental Effects: Simulating environmental effects, such as fog, rain, or reflections, adds to the
realism of the scene.
Interactive Realism:
o User Interaction: Natural and intuitive interactions, such as hand tracking and realistic object
manipulation, contribute to the immersive experience.
o Feedback and Response: Providing haptic feedback and responsive controls helps users feel more
connected to the virtual environment.
High-Resolution Textures: Use of high-resolution textures and detailed normal maps to create realistic surface
details.
Dynamic Lighting: Implementing dynamic lighting that changes based on time of day, user interactions, and
environmental conditions.
Advanced Shading Models: Utilizing advanced shading models that account for complex light interactions,
such as subsurface scattering and reflections.
Stereographic Usages
Stereography refers to techniques used to create the illusion of depth and three-dimensionality in visual
displays. In VR, stereographic methods are crucial for enhancing immersion and providing a convincing sense
of space.
1. Stereographic Techniques
Stereo Vision:
o Definition: Involves presenting two slightly different images to each eye to simulate the perception of
depth, similar to how human vision works.
o Process: Two cameras are positioned to mimic the distance between human eyes (interocular distance).
Each camera renders a separate image, which is then displayed to each eye through VR headsets.
Anaglyphic Stereo:
o Definition: Uses colored filters (typically red and cyan) to create a 3D effect on a 2D image. Each eye
sees a different color filter, creating a perception of depth.
o Application: Often used in legacy 3D glasses and images, but less common in modern VR due to color
and quality limitations.
Polarized Stereo:
o Definition: Uses polarized glasses and displays with different polarization angles for each eye to
achieve 3D effects.
o Application: Provides better color fidelity and is used in some 3D cinema and VR systems.
Dual Rendering: Rendering two images from slightly different viewpoints (one for each eye) to
create a stereoscopic effect. Each eye’s viewpoint is adjusted based on its position to simulate depth.
Depth Perception Adjustment: Adjusting the depth and convergence settings to match the user’s
natural vision and ensure comfort in VR experiences.
Video Content / Details of website for further learning (if any):
https://www.youtube.com/watch?v=3bfJ5AORAjQ
Course Faculty
Verified by
HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-10
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
GRASP - General Responsibility Assignment Software Patterns or Principles, abbreviated GRASP,
consist of guidelines for assigning responsibility to classes and objects in object-oriented design.
It is not related to the SOLID design principle.
Prerequisite knowledge for Complete understanding and learning of Topic:
Assigning responsibilities
Aspects of object design
Detailed content of the Lecture:
Five GRASP patterns:
Creator
Information Expert
Low Coupling
Controller
Creator
The concept of composition (Composite aggregates Part, Container contains Content, and Recorder
records)
Expert pattern: initializing data is passed in during creation via some kind of initialization method, such
as a java constructor that has parameters.
Assume that a payment instance, when created, needs to be initialized with the sale total. Since sale
knows the total, sale is a candidate creator of the payment.
Information Expert
Assign a responsibility to the information expert the class that has the information necessary to fulfill the
responsibility.
To create the interaction diagrams in order to assign responsibilities to objects.
To fulfill the responsibility of knowing and answering the sale's total.
Assign three responsibilities to three design classes of objects in the interaction diagram.
Summarize the methods in the method section of a class diagram
Low Coupling
Assign a responsibility so that coupling remains low. Use this principle to evaluate alternatives –
Coupling
An element with low coupling is not dependent on too many other classes, subsystems,
systems. High coupling problems:
Forced local changes because of changes in related classes.
Harder to understand in isolation.
Harder to reuse because its use requires the additional presence of the classes on which it is dependent.
Controller
A controller is the first object beyond the UI layer that is responsible for receiving or handling a system
operation message.
System
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
CSE III / VI
Course Name with Code: 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Design patterns provide a standard terminology and are specific to particular scenario. For example, a
singleton design pattern signifies use of single object so all developers familiar with single design pattern
will make use of single object and they can tell each other that program is following a singleton pattern.
Best Practices
Design patterns have been evolved over a long period of time and they provide best solutions to certain
problems faced during software development. Learning these patterns helps un-experienced developers to
learn software design in an easy and faster way.
1 Creational Patterns
These design patterns provides way to create objects while hiding the creation logic, rather than
instantiating objects directly using new operator. This gives program more flexibility in deciding
which objects need to be created for a given use case.
2 Structural Patterns
These design patterns concern class and object composition. Concept of inheritance is used to
compose interfaces and define ways to compose objects to obtain new functionalities.
3 Behavioral Patterns
These design patterns are specifically concerned with communication between objects.
4 J2EE Patterns
These design patterns are specifically concerned with the presentation tier. These patterns are
identified by Sun Java Center.
Video Content / Details of website for further learning (if any):
https://www.journaldev.com/1392/factory-design-pattern-in-java
Important Books/Journals for further learning including the page nos.:
James Rumbaugh Ivar Jacobson Grady Booch, The Unified Modelling Language Reference Manual,
Addison Wesley,2005.[23-28]
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(Autonomous )
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Using the principle of Information Expert a general approach to assigning responsibilities is to look
at a given responsibility, determine the information needed to fulfil it, and then determine where
that information is stored.
Information Expert will lead to placing the responsibility on the class with the most information
required to fulfil it.
Analysis
Main idea is very simple and intuitive – objects do only those operations which are connected with
contained by them informations.
Result of using this principle are solutions in which objects do those operations which in real world
normally do somebody on representing by them real objects.
This pattern is also analogy to the real world – it’s quite natural that responsibilities are delegated
to the peoples who have appropriate knowledge.
Contraindication
In some situations the solution resulting from Information Expert principle is not the best one
because of problems with coupling and cohesion.
What is more, we have to be careful about not breaking layer separation principle.
What object should write class A to the database? The most of information contains class A itself so
Information Expert says us that the class A should be responsible for writing itself to database.
But this new responsibilities would decrease cohesion and break layer separation rule.
Advantages
The rule of encapsulation is fulfilled – the objects do operations on the basis of contained
information’s.
This usually will follow to the decreasing the number of connections between objects and
decreasing of coupling.
What is more, different behaviors of the system are assigned to the different classes.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Using the principle of Information Expert a general approach to assigning responsibilities is to look
at a given responsibility, determine the information needed to fulfil it, and then determine where
that information is stored.
Information Expert will lead to placing the responsibility on the class with the most information
required to fulfil it.
Analysis
Main idea is very simple and intuitive – objects do only those operations which are connected with
contained by them informations.
Result of using this principle are solutions in which objects do those operations which in real world
normally do somebody on representing by them real objects.
This pattern is also analogy to the real world – it’s quite natural that responsibilities are delegated
to the peoples who have appropriate knowledge.
Contraindication
In some situations the solution resulting from Information Expert principle is not the best one
because of problems with coupling and cohesion.
What is more, we have to be careful about not breaking layer separation principle.
What object should write class A to the database? The most of information contains class A itself so
Information Expert says us that the class A should be responsible for writing itself to database.
But this new responsibilities would decrease cohesion and break layer separation rule.
Advantages
The rule of encapsulation is fulfilled – the objects do operations on the basis of contained
information’s.
This usually will follow to the decreasing the number of connections between objects and
decreasing of coupling.
What is more, different behaviors of the system are assigned to the different classes.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Best Practices
Design patterns have been evolved over a long period of time and they provide best solutions to certain
problems faced during software development.
Learning these patterns helps un-experienced developers to learn software design in an easy and faster
way.
CONTROLLER
The controller pattern assigns the responsibility of dealing with system events to a non-UI class that
represents the overall system or a use case scenario.
The controller is defined as the first object beyond the UI layer that receives and coordinates ("controls")
a system operation.
The controller pattern assigns the responsibility of dealing with system events to a non-UI class that
represents the overall system or a use case scenario.
A controller object is a non-user interface object responsible for receiving or handling a system event.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
FACTORY METHOD
Factory Method is a creational design pattern that provides an interface for creating objects in a
superclass, but allows subclasses to alter the type of objects that will be created.
A Factory Pattern or Factory Method Pattern says that just define an interface or abstract class
for creating an object but let the subclasses decide which class to instantiate.
In other words, subclasses are responsible to create the instance of the class.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-16
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Sample UML class and sequence diagram for the Bridge design pattern
The above Unified Modeling Language class diagram, an abstraction isn't implemented as usual in a
single inheritance hierarchy.
Instead, there is one hierarchy for an abstraction and a separate hierarchy for its implementation ,
which makes the two independent from each other.
The operation() interface is implemented in terms of by delegating to the interface
(impOperationImp()).
The UML sequence diagram shows the run-time interactions: The implementation1 object delegates
implementation to the implementor1 object by calling operationImp() on Implementor1, which performs
the operation and returns to abstraction1.
James Rumbaugh Ivar Jacobson Grady Booch, The Unified Modelling Language Reference Manual, Addison
Wesley,2005.[45-49]
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-17
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Introduce a class to convert the interface of one component into another interface is called adapter.
Interfaces may be incompatible, but the inner functionality should suit the need.
The adapter design pattern allows otherwise incompatible classes to work together by converting the
interface of one class into an interface expected by the clients.
An adapter can be used when the wrapper must respect a particular interface and must
support polymorphic behavior.
Alternatively, a decorator makes it possible to add or alter behavior of an interface at run-time, and
a facade is used when an easier or simpler interface to an underlying object is desired.
BEHAVIORAL
UML behavioral diagrams visualize, specify, construct, and document the dynamic aspects of a system.
The behavioral diagrams are categorized as follows:
use case diagrams,
interaction diagrams
state–chart diagrams
activity diagrams
1. Interactions Terms and Concepts Modeling Techniques
2. Interaction Diagrams Terms and Concepts Modeling Techniques
James Rumbaugh Ivar Jacobson Grady Booch, The Unified Modelling Language Reference Manual,
Addison Wesley,2005.[39-47]
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
CSE III / VI
Course Faculty :
Introduction :
Strategy lets the algorithm vary independently from clients that use it.
Observer defines a one-to-many dependency between objects so that when one object
changes state, all its dependents are notified and updated automatically.
The observer pattern is a software design pattern in which an object, called the subject, maintains a list of
its dependents, called observers, and notifies them automatically of any state changes, usually by calling
one of their methods.
It is mainly used to implement distributed event handling systems, in "event driven" software. In those
systems, the subject is usually called a "stream of events" or "stream source of events", while the
observers are called "sink of events".
The stream nomenclature simulates or adapts to a physical setup where the observers are physically
separated and have no control over the emitted events of the subject/stream-source.
This pattern then perfectly suits any process where data arrives through I/O, that is, where data is not
available to the CPU at startup, but can arrive "randomly" (HTTP requests, GPIO data, user input from
keyboard or mouse, distributed databases and blockchains .
Most modern languages have built-in "event" constructs which implement the observer pattern
components.
While not mandatory most 'observers' implementations will use background threads listening for subject
events and other support mechanism from the kernel Linux epoll.
It addresses following problems:
A one-to-many dependency between objects should be defined without making the objects tightly
coupled.
It should be ensured that when one object changes state an open-ended number of dependent objects are
updated automatically.
It should be possible that one object can notify an open-ended number of other objects.
The Observer design pattern is one of the twenty-three well-known "Gang of Four" design patterns that
describe how to solve recurring design problems to design flexible and reusable object-oriented software,
that is, objects that are easier to implement, change, test, and reuse.
Strategy Pattern
The strategy pattern (also known as the policy pattern) is a behavioral software design pattern that
enables selecting an algorithm at runtime.
Instead of implementing a single algorithm directly, code receives run-time instructions as to which in a
family of algorithms to use.
For instance, a class that performs validation on incoming data may use the strategy pattern to select a
validation algorithm depending on the type of data, the source of the data, user choice, or other
discriminating factors.
These factors are not known until run-time and may require radically different validation to be
performed.
The validation algorithms (strategies), encapsulated separately from the validating object, may be used
by other validating objects in different areas of the system (or even different systems) without code
duplication.
This is compatible with the open/closed principle (OCP), which proposes that classes should be open for
extension but closed for modification.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -19
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
A POS system is a computerized application used (in part) to record sales and handle payments; it
is typically used in a retail store.
Prerequisite knowledge for Complete understanding and learning of Topic:
Course Faculty
Verified by
HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-20
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Inception is about understanding the project scope and objectives and getting enough information to
confirm that the project should proceed - or to convince you that it should not.
Prerequisite knowledge for Complete understanding and learning of Topic:
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-21
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Course Faculty
Verified by HOD
.
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -22
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
An extend dependency, formerly called an extends relationship in UML v1. 2 and earlier, is a
generalization relationship where an extending use case continues the behavior of a base use
case.
Prerequisite knowledge for Complete understanding and learning of Topic:
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -23
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Topic of Lecture: Elaboration Domain Models- Finding conceptual classes and description classes
Introduction :
Conceptual class hierarchies are often inspiration for software class hierarchies that exploits inheritance
and reduce duplication of code.
Domain Model
Defining is valuable to identify conceptual super and subclasses, it is useful to clearly and precisely
understand generalization, super classes, and subclasses in terms of class definition and class sets.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -24
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
An association indicates that the system you are developing stores links of some kind between the
instances of the associated types.
Prerequisite knowledge for Complete understanding and learning of Topic:
Domain Model
Associations
Attributes
Detailed content of the Lecture:
Association
Association is a group of links having common structure and common behavior. Association depicts the
relationship between objects of one or more classes.
A link can be defined as an instance of an association.
Degree of an Association
Degree of an association denotes the number of classes involved in a connection. Degree may be unary, binary, or
ternary.
A unary relationship connects objects of the same class.
A binary relationship connects objects of two classes.
A ternary relationship connects objects of three or more classes.
Cardinality Ratios of Associations
One–to–One − A single object of class A is associated with a single object of class B.
One–to–Many − A single object of class A is associated with many objects of class B.
Many–to–Many − an object of class A may be associated with many objects of class B and conversely an
object of class B may be associated with many objects of class A.
Attributes
A set of attributes for the objects that are to be instantiated from the class. Generally, different objects of
a class have some difference in the values of the attributes. Attributes are often referred as class data.
A set of operations that portray the behavior of the objects of the class. Operations are also referred as
functions or methods.
Domain Model Refinement
A domain model contains conceptual classes, associations between conceptual classes, and attributes of a
conceptual class. "Informally, a conceptual class is an idea, thing, or object".
Generalization
Generalization is the process of extracting shared characteristics from two or more classes, and combining them
into a generalized super class. Shared characteristics can be attributes, associations, or methods.
Specialization
Specialization means creating new subclasses from an existing class. If it turns out that certain attributes,
associations, or methods only apply to some of the objects of the class, a subclass can be created. The most
inclusive class in a generalization/specialization is called the super class and is generally located at the top of the
diagram. The more specific classes are called subclasses and are generally placed below the super class.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -25
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
A domain model is illustrated with a set of class diagrams in which no operations (method signatures)
are defined
Prerequisite knowledge for Complete understanding and learning of Topic:
Associations
Attributes
Domain Model
Detailed content of the Lecture:
A domain model is illustrated with a set of class diagrams in which no operations (method signatures)
are defined
Association
Association is a group of links having common structure and common behavior. Association depicts the
relationship between objects of one or more classes.
A link can be defined as an instance of an association.
Degree of an Association
Degree of an association denotes the number of classes involved in a connection. Degree may be unary, binary,
or ternary.
A unary relationship connects objects of the same class.
A binary relationship connects objects of two classes.
A ternary relationship connects objects of three or more classes.
Cardinality Ratios of Associations
One–to–One − A single object of class A is associated with a single object of class B.
One–to–Many − A single object of class A is associated with many objects of class B.
Many–to–Many − an object of class A may be associated with many objects of class B and conversely
an object of class B may be associated with many objects of class A.
Attributes
A set of attributes for the objects that are to be instantiated from the class.
Generally, different objects of a class have some difference in the values of the attributes.
Attributes are often referred as class data.
A set of operations that portray the behavior of the objects of the class.
Operations are also referred as functions or methods.
Domain Model Refinement
A domain model contains conceptual classes, associations between conceptual classes, and attributes of
a conceptual class. "Informally, a conceptual class is an idea, thing, or object".
Generalization
Generalization is the process of extracting shared characteristics from two or more classes, and
combining them into a generalized super class.
Shared characteristics can be attributes, associations, or methods.
Specialization
Specialization means creating new subclasses from an existing class.
If it turns out that certain attributes, associations, or methods only apply to some of the objects of the
class, a subclass can be created.
The most inclusive class in a generalization/specialization is called the super class and is generally
located at the top of the diagram.
The more specific classes are called subclasses and are generally placed below the super class.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -26
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Conceptual class hierarchies are often inspiration for software class hierarchies that exploits inheritance
and reduce duplication of code.
Domain Model
Defining is valuable to identify conceptual super and subclasses, it is useful to clearly and precisely
understand generalization, super classes, and subclasses in terms of class definition and class sets.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -27
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Aggregation implies a relationship where the child can exist independently of the parent. Example: Class
(parent) and Student (child). Delete the Class and the Students still exist.
Composition implies a relationship where the child cannot exist independent of the parent. Example:
House (parent) and Room (child).
So basically, the aggregation link doesn’t state in any way that Class A owns Class B nor that there is
a parent-child relationship (when parent deleted all its child’s are being deleted as a result) between
the two.
Actually, quite the opposite! The aggregation link usually used to stress the point that Class A is not
the exclusive container of Class B, as in fact Class B has another container.
Composition (Not-Shared Association)
In cases where in addition to the part-of relationship between Class A and Class B - there’s a strong life
cycle dependency between the two, meaning that when Class A is deleted then Class B is also deleted
as a result, we should be more specific and use the composition link instead of the aggregation link or
the association link.
The composition link shows that a class (container, whole) has exclusive ownership over other
class/s (parts), meaning that the containers object and its parts constitute a parent-child/s relationship.
Unlike association and aggregation, in the composition relationship, the composed class cannot appear
as a return type or parameter type of the composite class, thus changes in the composed class cannot be
propagated to the rest of the system.
Consequently, usage of composition limits complexity growth as the system grows.
Significance:
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -28
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
System sequence diagram (SSD) is a sequence diagram that shows, for a particular scenario of a use case,
the events that external actors generate, their order, and possible inter-system events.
UML Diagrams
Definition
System sequence diagrams, also known as SSD, are actually a sub-type of sequence diagrams, whose
style and notation is dictated by the Unified Modeling Language.
This language provides a toolkit for diagram creators to make and read diagrams that are comprehensible
regardless of location or industry.
Standard sequence diagrams show the progression of events over a certain amount of time, while system
sequence diagrams go step further and present sequences for specific use cases.
Most elements we cover in use case diagrams remain in use throughout a system sequence diagram, including:
Objects - this box shape with an underlined title represents a class, or object, in UML. Within a SSD, this
shape models the system as a black box (a system with inner workings that are not immediately visible).
Actors - shown by stick figures, actors are entities that interact with the system, and yet are external to it.
Events - the system events that the actors generate in the sequence. A dashed line, known as a lifeline,
represents events in an SSD. Lifelines may begin with a labeled rectangle shape or an actor symbol.
Benefits of system sequence diagrams
SSDs are ideal for demonstrating when and how tasks are completed in a system, especially as those tasks relate
to use cases. Here are a few specific examples of when to use SSDs:
In a step-wise fashion, modeling operations of the system in response to events.
Building a blueprint for the main success scenario of a given use case, then creating alternative paths.
Identifying major system events and operations in order to come up with realistic estimates of resources
needed.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -29
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Sequence diagrams only specify the ordering of events and not the exact timings of events.
An activation box represents the period during which an operation is executed.
Shows interactions between objects in visual and chronological (time) order.
From the refined sequence diagrams, new use-case relationships are discovered: new generalization/
specialization and extension relationships.
Generalization/ specialization relationships between abstract and particular use cases are identified.
Some of the previous steps might be applied incrementally in the development process.
Combined Fragments
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-30
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Course Faculty
Verified by HOD
.
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-31
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Logical architecture is the large-scale organization of the software classes into packages (or namespaces),
subsystems, and layers.
Logical - because there's no decision about how these elements are deployed across different operating
system processes or across physical computers in a network (deployment architecture).
Design
Implementation
Process
Deployment
The center is the Use Case view which connects all these four.
A Use Case represents the functionality of the system. Hence, other perspectives are connected with use case.
Design of a system consists of classes, interfaces, and collaboration.
UML provides class diagram, object diagram to support this.
Implementation defines the components assembled together to make a complete physical system. UML
component diagram is used to support the implementation perspective.
Process defines the flow of the system. Hence, the same elements as used in Design are also used to support this
perspective.
Deployment represents the physical nodes of the system that forms the hardware. UML deployment diagram is
used to support this perspective.
It is very important to distinguish between the UML model. Different diagrams are used for different types of
UML modeling. There are three important types of UML modeling.
STRUCTURAL MODELING
Structural modeling captures the static features of a system. They consist of the following −
Classes diagrams
Objects diagrams
Deployment diagrams
Package diagrams
Composite structure diagram
Component diagram
Structural model represents the framework for the system and this framework is the place where all other
components exist. Hence, the class diagram, component diagram and deployment diagrams are part of structural
modeling. They all represent the elements and the mechanism to assemble them.
The structural model never describes the dynamic behavior of the system. Class diagram is the most widely used
structural diagram.
BEHAVIORAL MODELING
Behavioral model describes the interaction in the system. It represents the interaction among the structural
diagrams. Behavioral modeling shows the dynamic nature of the system. They consist of the following −
Activity diagrams
Interaction diagrams
Use case diagrams
All the above show the dynamic sequence of flow in a system.
ARCHITECTURAL MODELING
Architectural model represents the overall framework of the system. It contains both structural and behavioral
elements of the system. Architectural model can be defined as the blueprint of the entire system. Package
diagram comes under architectural modeling.
Video Content / Details of website for further learning (if any):
https://www.youtube.com/watch?v=3VX3QpUuvfs
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-32
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Package diagram is UML structure diagram which shows structure of the designed system at the
level of packages. The following elements are typically drawn in a package diagram: package,
packageable element, dependency, element import, package import, package merge.
UML Diagrams
Package Template
Logical Architecture And Layers
Logical architecture is the large-scale organization of the software classes into packages (or
namespaces), subsystems, and layers.
Logical - because there's no decision about how these elements are deployed across different
operating system processes or across physical computers in a network (deployment architecture).
Layering Pattern
A layer is a very coarse-grained grouping of classes, packages, or subsystems that has cohesive
responsibility for a major aspect of the system.
Also, layers are organized such that "higher" layers (such as the UI layer) call upon services of
"lower" layers, but not normally vice versa.
Strict layered architecture VS Relaxed Layered Architecture.
A logical architecture doesn't have to be organized in layers.
But it's very common, and hence, introduced at this time.
Typical Layers Typically layers in an OO system
User Interface.
Application Logic and Domain Objects software objects representing domain concepts (for
example, a software class Sale) that fulfill application requirements, such as calculating a sale total.
.
Course Faculty
Verified by
HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -33
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Package diagram is UML structure diagram which shows structure of the designed system at the level of
packages.
The following elements are typically drawn in a package diagram: package, packageable element,
dependency, element import, package import, package merge.
UML Diagrams
UML package diagram
Detailed content of the Lecture:
Package
Package is a namespace used to group together elements that are semantically related and might change
together.
It is a general purpose mechanism to organize elements into groups to provide better structure for system
model.
Owned members of a package should all be packageable elements.
If a package is removed from a model, so are all the elements owned by the package.
Package by itself is packageable element, so any package could be also a member of other packages.
Package Template
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -34
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Class diagram in the Unified Modeling Language is a type of static structure diagram that describes the
structure of a system by showing the system's classes, their attributes, operations, and the relationships
among objects.
UML Diagrams
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-35
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Interaction Overview Diagram is one of the fourteen types of diagrams of the Unified Modeling
Language, which can picture a control flow with nodes that can contain interaction diagrams.
The interaction overview diagram is similar to the activity diagram, in that both visualize a sequence of
activities.
UML Diagrams
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -36
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Interaction Overview Diagram is one of the fourteen types of diagrams of the Unified Modeling
Language, which can picture a control flow with nodes that can contain interaction diagrams.
The interaction overview diagram is similar to the activity diagram, in that both visualize a sequence of
activities.
INTERACTION DIAGRAMS
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. The Sequence
Diagram
The sequence diagram has four objects (Customer, Order, SpecialOrder and NormalOrder).
STATECHART DIAGRAM
Statechart diagrams are very important for describing the states.
Before drawing a Statechart diagram we should clarify the following points −
Identify the important objects to be analyzed.
Identify the states.
Identify the events.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-37
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-38
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Design patterns represent the best practices used by experienced object-oriented software developers.
Design patterns are solutions to general problems that software developers faced during software
development.
These solutions were obtained by trial and error by numerous software developers over quite a substantial
period of time.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-39
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Mapping from Design to Code. Each class in design is implemented by coding it in a programming
language or by using a pre-existing component
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L -40
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Mapping from Design to Code. Each class in design is implemented by coding it in a programming
language or by using a pre-existing component
GoF Patterns
UML Diagrams
Detailed content of the Lecture:
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-41
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Issues in Object oriented testing: Traditional testing methods are not directly applicable to OO
programs as they involve OO concepts including encapsulation, inheritance, and polymorphism. These
concepts lead to issues, which are yet to be resolved
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-42
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Class testing is the base of object-oriented software testing. It involves three aspects: testing each
method, testing the relations among class methods and testing the inheriting relation between class and
subclass.
Unit
The smallest chunk that can be compiled by itself
A single method that does not call use other methods
Something small enough to be developed by one person
When units are methods
Simplistic view reduces to traditional procedural unit
testing Apply functional and structural test methods
Require drivers and stubs
Encapsulation
advantage Methods
are simple
Encapsulation disadvantage
Interface complexity is high
Intense message sending
Lots of work building stubs and drivers
Burden of testing moves to integration
level Intraclass
Interclass
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-43
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
Integration Testing: This involves testing a particular module or a subsystem and is the responsibility of
the subsystem lead.
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-44
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
Introduction :
GUI testing is defined as the process of testing the system's Graphical User Interface of the Application
Under Test.
GUI testing involves checking the screens with the controls like menus, buttons, icons, and all types of
bars - toolbar, menu bar, dialog boxes, and windows, etc.
There is some challenge which is occurring during Graphical user interface testing.
These are given below.
Technology Support
Stability of Objects
Instrumentation
Course Faculty
Verified by HOD
MUTHAYAMMAL ENGINEERING
COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi, Accredited by NAAC & Affiliated to Anna
University) L-45
Rasipuram - 637 408, Namakkal Dist., Tamil Nadu
LECTURE HANDOUTS
CSE III / VI
Course Name with Code : 21CSF23&OBJECT ORIENTED ANALYSIS AND DESIGN
Course Faculty :
GUI testing is defined as the process of testing the system's Graphical User Interface of the Application
Under Test.
GUI testing involves checking the screens with the controls like menus, buttons, icons, and all types of
bars - toolbar, menu bar, dialog boxes, and windows, etc.
Course Faculty
Verified by HOD