TOPCIT Software | 07. Software Detail Design
Summary
TLDRThis script delves into the concept of software modularity, emphasizing its benefits like reduced complexity and improved reliability. It explores coupling and cohesion as measures of module independence and outlines structured design methods for creating control structures and refining them incrementally. The script also covers class design in object-oriented programming, detailing the transition from class diagrams to implementation, including operation signatures and associations. Lastly, it introduces software design patterns, categorizing them into creational, structural, and behavioral, highlighting their role in solving common software design issues.
Takeaways
- 🧩 Software Modularity: The script discusses the concept of software modularity, which involves breaking down software into functional modules to enhance independence, manageability, and efficiency.
- 🔗 Coupling and Cohesion: It explains the importance of low coupling and high cohesion for module independence, with various types of coupling and cohesion described to measure this independence.
- 🛠️ Modular Benefits: The advantages of software modularity include reduced complexity, easier changes, efficient memory management, and improved reliability, leading to time and cost savings in development.
- 🏗️ Design Time Considerations: Software developers must consider modularity during the design phase to ensure functional independence and effective development.
- 🔍 Cohesion and Coupling Details: The script delves into the specifics of different types of coupling (e.g., data, stamp, control) and cohesion (e.g., functional, sequential, logical) and their impact on module independence.
- 📊 Structured Design Method: It outlines the steps of structured design, starting with control structures and data flow diagrams, to create a structured chart that defines the call order between functions.
- 🔄 Incremental Development: The script suggests an incremental approach to development and design review, allowing for the refinement of control structures and the improvement of code quality.
- 📚 Class Design in OOD: The process of refining class diagrams in object-oriented design (OOD) by determining operation signatures, attributes, and visibility within classes is explained.
- 🔄 Association Implementation: The script covers how associations between classes in OOD are translated into reference attributes during the detailed design phase, with examples of one-to-many and many-to-many associations.
- 🎨 Design Patterns: The concept of software design patterns as reusable solutions to common software design problems is introduced, with a distinction between creational, structural, and behavioral patterns.
- 🔑 Pattern Classification: It differentiates between class patterns, which are applied to classes and determined at compile time, and object patterns, which deal with runtime object relationships and are more dynamic.
Q & A
What is software modularity and why is it important?
-Software modularity refers to the practice of breaking down software into smaller, separate components called modules based on functionality. It is important because it reduces software complexity, making changes easier, facilitating program implementation, and improving reliability, which in turn saves development time, effort, and cost.
How is the independence of a module measured in software modularity?
-The independence of a module is measured by the degree of coupling and cohesion. Lower coupling indicates fewer dependencies on other modules, while higher cohesion means that the elements within a module are closely related to each other.
What are the default properties of a module in software modularity?
-The default properties of a module include IO elements for accepting and exporting data, functional elements for converting input to output, procedural codes for performing a function, and internal data elements that the module itself refers to.
What are the types of coupling in software modularity and which is the weakest?
-Types of coupling include data coupling, stamp coupling, control coupling, external coupling, common coupling, and content coupling. Data coupling is the weakest as it involves the least interdependence between modules.
What does cohesion in software modularity represent and what are its types?
-Cohesion represents the degree to which elements within a module are related to each other, indicating how well a module is defined as an independent function. Types of cohesion include functional, sequential, exchange, procedural, temporal, logical, and coincident cohesion, with functional cohesion being the strongest and coincident cohesion the weakest.
Can you explain the structured method in software detailed design?
-In the structured method of software detailed design, a control structure is designed to implement the processes of the data flow diagram assigned to each task and module. This involves creating a structure chart that defines the call order between functions and helps in identifying duplicated call relationships, leading to a more concise control structure.
How does incremental implementation and review in detailed design improve code quality?
-Incremental implementation and review allow developers to implement functionality in small, manageable pieces, review them through a structure chart, and then refine the code based on the improvements identified. This iterative process leads to higher quality code that reflects the refinements made.
What is the purpose of creating a structure chart in detailed design?
-The purpose of creating a structure chart is to visualize the relationships between functions, helping to identify duplicated call relationships and to ensure that derived functions have an appropriate size for implementation. It also aids in determining the specific control structure corresponding to the programming language used.
What is the role of class detailed design in object-oriented design?
-The role of class detailed design in object-oriented design is to refine the class diagram by determining the properties, operations, and associated visibility within the class. It involves defining exact operation signatures and attributes based on inputs such as class diagrams and sequence diagrams.
How are associations between classes implemented during the detailed design phase?
-Associations between classes are implemented by replacing them with reference attributes that match the selected object-oriented language. This transformation turns associations shown in the class diagram into reference attributes of the class, making them suitable for implementation.
What are software design patterns and how are they classified?
-Software design patterns are common, reusable solutions to problems that can arise in software design. They can be converted into source code and represent best practices for programmers. Design patterns are classified into creational, structural, and behavioral patterns, with further distinction between class patterns, which apply mainly to classes, and object patterns, which apply mainly to objects.
Outlines
📚 Software Modularity and Design Principles
This paragraph delves into the concept of software modularity, emphasizing the importance of decomposing software into functional modules to enhance maintainability and complexity management. It explains the properties of modules, including IO elements, functional elements, procedural codes, and internal data. The benefits of modularity, such as reduced complexity, easier changes, efficient memory management, and improved reliability, are highlighted. The paragraph also touches on the significance of cohesion and coupling in measuring module independence, detailing different types of coupling and cohesion, and their impact on software design.
🔍 Detailed Design Methods and Structure Charts
The second paragraph focuses on the structured method of software detailed design, illustrating how control structures are designed to implement data flow processes assigned to tasks and modules. It describes the creation of structure charts to define the call relationships between functions and the importance of refining these charts to avoid duplicated calls and achieve a more concise control structure. The paragraph also discusses the incremental implementation of functionality, the review process through structure charts, and the refinement of initial structure charts to ensure functions are appropriately sized for implementation.
🏭 Class Design and Association Implementation
This paragraph explores the detailed design of classes in object-oriented design, explaining how class diagrams are refined by determining properties, operations, and visibility. It provides an example of constructing an operation signature for the 'Account' class in Java and discusses the implementation of associations between classes as reference attributes. The paragraph also covers the use of collection types for one-to-many associations and the rules for transitioning associations to reference type attributes, depending on the object-oriented language used.
🎨 Software Design Patterns: Classification and Characteristics
The final paragraph introduces software design patterns as reusable solutions to common software design problems, which can be directly translated into source code. It classifies design patterns into creational, structural, and behavioral patterns, and further distinguishes between class patterns applied to classes and object patterns applied to objects. The paragraph explains the roles of these patterns in object creation, class synthesis, and interaction definition, providing insights into how they facilitate best practices in programming and improve software design.
Mindmap
Keywords
💡Software Modularity
💡Coupling
💡Cohesion
💡Control Structure
💡Structured Design
💡Incremental Implementation
💡Class Diagram
💡Operation Signature
💡Association
💡Software Design Pattern
💡Behavioral Pattern
Highlights
Software modularity is the decomposition of software by functions, emphasizing the independence of each module.
The independence of modules is measured by coupling and cohesion, with lower coupling and higher cohesion indicating better modularity.
Modules consist of IO elements, functional elements, procedural codes, and internal data elements.
Advantages of software modularity include reduced complexity, easier changes, efficient memory management, and improved reliability.
Modularity allows for variable inheritance, saving development time, efforts, and costs.
Designing modules with functional independence in mind is crucial for effective development.
Coupling types range from data coupling, the weakest, to content coupling, the strongest, affecting module independence.
Cohesion types include functional, sequential, and others, with functional cohesion being the strongest.
Structural detail design involves creating a control structure to implement data flow processes.
Incremental implementation and review of modules can lead to high-quality code and improved functionality.
The initial structure chart creation is based on the tasks and processes assigned to modules.
Refining the structure chart involves decomposing functions for appropriate implementation size.
Class detailed design refines class diagrams by determining properties, operations, and visibility.
Associations between classes are replaced by reference attributes during detailed design.
Design patterns provide reusable solutions to common software design problems.
Design patterns are categorized into creational, structural, and behavioral patterns.
Class patterns are applied to classes, while object patterns are applied to objects and can change at runtime.
Creational patterns are involved in the object creation process, while structural patterns deal with class or object composition.
Behavioral patterns define interactions and responsibility distribution among classes or objects.
Transcripts
[Music]
[Music]
[Music]
[Music]
[Music]
[Music]
[Music]
you
[Music]
[Music]
you
[Music]
first let's look at the meaning of
software modularity software modularity
refers to the decomposition of software
by functions and the module is
decomposed for each function thus the
independence of each decompose module is
measured by the degree of coupling and
cohesion the properties of the module
are as follow
it has default properties such as IO
elements that accept and export data
functional elements that convert input
to output procedural codes are logic to
perform a function and internal
workplace of module or internal data
elements that the module itself refers
to also a module consists of a calling
module that calls another module and a
called module that is called by another
module there are several advantages by
doing this software modularity first the
complexity of the software is reduced
the changes are easier and the program
is easy to implement in addition it is
available to many of them by calling the
module name as variable declarations are
efficient memory management would be
useful you can inherit variables without
defining them for each module in
particular you can save development time
efforts and costs and it has the effect
of improving reliability there for
software developers always have to think
about modularity of the program a design
time for effective development
the most important stuffs when designing
a module is to maintain the functional
independence of the module so let's take
a closer look at the cohesion and
coupling that can measure the degree of
module independence first let's look at
coupling the coupling is the degree of
interdependence between modules or the
relationship between two modules in
order to become an independent module
the coupling between each module should
be weak and few modules depend on it
types of couplings include data coupling
stamp coupling control coupling external
coupling common coupling and content
coupling you can see that the degree of
data coupling is the weakest and the
content coupling is the strongest as
shown in the figure
next is the cohesion the coherence is an
extension of the concept of information
hiding which means the degree to which
elements in a module are related to each
other that is the extent to which a
module is defined as an independent
function to become an independent module
the cohesion of each module must be
strong types of cohesion include
functional cohesion sequential cohesion
exchange cohesion procedural cohesion
temporal cohesion logical cohesion and
coincident cohesion the degree of
cohesion indicates that functional
cohesion is strongest and coincident
cohesion is weakest first let's look at
the structural detail design method in
software detailed design steps by
structured method a control structure is
designed to implement the processes of
the data flow diagram assigned to each
task and module here a control structure
refers to a call relationship between
functions in a structured development
language such as the C language and
passing parameters through a call so far
the processes used to represent
functionality and their dependencies
have simply described constraints on the
order in which they are executed between
processes now we will create a structure
chart for the functions we need to
construct the actual programs than the
design of the control structures that
define the call order between them
note that the detailed design steps does
not have to be completed before the
implementation begins the structure
chart shows the relationships between
the functions to help you identify
duplicated call relationships and gain a
more concise control structure therefore
it is efficient to gradually repeat the
implementation and detailed design
review in other words you can implement
the functionality you need incrementally
review them through a structure chart
and then can write high-quality code
that reflects your improvements it is
more effective to implement the
functions of the modules gradually
repeating reviews after developing them
as the functional units the first
activity in the structured detailed
design steps is the creation of a
structure chart in creating a structure
chart a specific control structure
corresponding to the components of the
programming language to be used in the
implementation must be derived in order
to implement the processes assigned to
the tasks and modules in other words
there must be some function there must
be a decision about the call relation
between each function and the parameters
to be passed through these call
relationships must be determined
creating a structure chart is roughly
divided into two tasks first perform an
initial structure chart creation that
satisfies the dependencies of given
processes and refine initial structure
chart so that derived functions have
appropriate size first I will explain
the initial structure chart creation the
creation of initial structure chart
starts by creating a structure chart
that implements the functions of the
interface based on the tasks and the
processes assigned to the modules to
understand the technique of creating a
structure chart you must be able to
clearly distinguish between the
information flow and processes and the
call relationships that make up the
control structure the figure shows the
information flow between two processes
in this figure it is specified that
process a creates the data after the
operation and sends it to process B this
information flow can be largely
implemented in three ways the first way
is that the function corresponding to
the preceding process calls the function
corresponding to the trailing process so
in the picture a calls B the following
figure shows an example where function a
calls function B the code examples in
the figure show how the proposed
structure chart is implemented in a
pseudo codes the second implementation
is that the function that corresponds to
the tailing process calls the function
that corresponds to the preceding
process that is function B calls
function a
the following figure shows an example of
this the code example in the figure
shows how this works function B calls
function a before performing its role
then function a returns to function B
which is performing its role
finally function B will perform its role
this will implement the information flow
between processes a and B the third
implementation is to create functions
corresponding to processes a and B and
introduce a new function to create a
call relationship between two functions
the following figure shows the
introduction of the new function C by
the third implementation and the code
example shows how this works function C
can be seen that a calls function B
after function a was called to satisfy
the information flow the following is
the process of refining the structure
chart created this step performs the
process of decomposing the functions
derived from the initial structure chart
in detail so that they have an
appropriate size for example the initial
structure chart created as shown on the
left is decomposed in detail as shown on
the right this process performs to
decompose each function in the initial
structure chart until it gets functions
with appropriate size for the
implementation for example suppose that
you need to manipulate the hardware to
read the sensor values for sensor value
input and correct the values if
necessary by decomposing these tasks
into appropriate functions you get a
structure chart like the screen
structure chart adds functions sensor
reading and error correction to detail
the function sensor value input the
function sensor reading reads the sensed
values by the sensor through the
hardware function error correction will
be called if error correction is
required after sensor reading has been
performed you can see the condition
notation at the end of the call line to
indicate this this time let me explain
the detailed design of the class which
is the detailed design activity in
object-oriented design each class
represented in the class diagram created
in the object and behavior analysis
phase does not specify an exact
operation signature so the purpose of
the class detailed design phase is to
refine the class diagram by determining
the property's operations and associated
visibility inside the class inputs
include class diagrams and sequence
diagrams the output has a refined class
diagram for each class shown in the
class diagram or a find class diagram is
output by determining the type and
visibility of the correct operation
signature and attributes let's look at
how the operation signature is
constructed through the example the
example is designed for the operation
signature attribute type and visibility
of the account class when the Java
language is adopted as an
object-oriented programming language in
addition you can see that a constructor
that creates an account object has been
added next is an implementation of the
Association during the detailed design
phase the association between classes
are replaced by reference attributes
that match the selected object oriented
language the purpose of the Association
implementation is to transform the
Association shown in the class diagram
into reference attributes of the class
the input has a class diagram you can
see that the output part from this
Association implementation is the class
with reference attribute
the Association implementation is made
for identified dynamic associations
through behavior analysis activities in
general dynamic associations with
many-to-many cardinality are hard to
find
therefore you can see that the
implementation of many to many
associations is excluded from the
instructions in the screen the table
shows the rules for transiting and
Association to a reference type
attribute in fact the reference type
properties depend on the object-oriented
language for example in case of Java
only object reference types are possible
in C++ however reference type attributes
can be implemented with object reference
types and pointers for one-way
one-to-many Association you can see the
use of collection type collection type
refers to algorithm classes such as set
bag list and hash table related to data
structure the example collection type is
based on the Java language in general
other object-oriented languages also
support collection types for C++ it
supports standard template library in
the table you can see how each
Association type is explained in the
design class diagram and how the class
is designed in relation to each
Association now let's take a look at an
example to show how associations are
implemented the control classes
associated with the depositor service
system are only with draw workflow and
transfer workflow you can see that each
control class has an association with
the object class account in case of
account transfers the maximum
cardinality is 2 therefore the reference
type property in the transfer workflow
class is defined as an array type the
figure on the right is an example of
converting the associations shown in the
left figure to a reference type
attribute
[Music]
the software design pattern is analogous
to the pattern used in costume design to
be precise a software design pattern is
a common reusable solution to address
the problems that can arise in the
context of software design these design
patterns can be not only just design
itself but also instantly converted into
source codes it is an explanation or
sample of how to troubleshoot the
problems applied in various situations
it is also formulating the best
practices for programmers to implement
typically it shows the interaction or
relationship between classes or objects
this time we will look at how design
patterns are classified and what their
characteristics are design patterns are
divided into creational patterns
structural patterns and behavioral
patterns according to purpose and
depending on the scope you can
distinguish between class patterns that
are mainly applied to classes and object
patterns that are mainly applied to
objects first a creational pattern is a
pattern involved in the process of
creating an object a structural pattern
is a pattern about the synthesis of a
class or object a behavioral pattern is
a pattern that defines how a class or
object interacts and how
responsibilities are distributed and the
class pattern that applies mainly to the
class is the pattern that deals with the
relation between the class and the
subclass relevancy is mainly inherited
and it is determined statically at the
compile time an object pattern is a
pattern that deals with object relevance
which can be changed at runtime and has
a dynamic nature let's look at it more
detail in the case of the creational
class pattern it has the responsibility
for subclass to transfer some of the
responsibility for creating objects the
creational object pattern is responsible
for delegating responsibility for
creating objects to other objects next
the structural class pattern is used to
compound classes using inheritance
structural object pattern
defines how objects are composited and
in the case of behavioral class patterns
inheritance is used to describe the
algorithm and control flow behavioral
object pattern is responsible for
describing how a set of objects
cooperate to perform a task
[Music]
[Music]
[Music]
تصفح المزيد من مقاطع الفيديو ذات الصلة
SE 23: Coupling & Cohesion with Examples | Software Engineering
8 Design Patterns EVERY Developer Should Know
UML Diagram For Software Engineering | Unified Modelling Language Diagram | Simplilearn
Project Based Internship Klinikgo Health System Analyst - Company Coaching Video 1
Programming Concepts - Design Patterns (Creational, Structural and Behavioral)
what is software designing? full Explanation | Learn Coding
5.0 / 5 (0 votes)