Professional Documents
Culture Documents
Software Design , Coding and Testing: Good software design, Cohesion and Coupling, Software Design
Approaches, User interface Design, Software Coding and Goals of UML - Role of UML in Object oriented Design -
Building blocks of UML : Things, Relationships, and Diagrams - Symbols used in UML notation - Classify and
list standard UML diagrams - Class diagram, purposes of class diagram, draw the class diagram - Use case diagram,
define the term Use case, purposes of Use case diagram, draw the Use case diagram - Interaction diagram,
purposes of Interaction diagram, the types of interaction diagrams : Sequence diagram and Collaboration
diagram, draw the Interaction diagrams.
-----------------------------------------------------------------------------------------------------------------------------------------------------
High-level design means identification of different modules and the control relationships among them and the
definition of the interfaces among these modules. The outcome of the high-level design is called software
architecture or the program structure. Many different types of notations have been used to represent a high-
level design. A popular way is to use a tree-like diagram called the Structure Chart to represent the control
hierarchy in the high-level design.
Detailed Design
During detailed design, the data structure and the algorithms of the different modules are designed. The outcome
of the detailed design stage is usually known as the module-specification document
The definition of a“good” software design can vary depending on the exact application being designed. For
example, “memory size used up by a program” may be an important way to characterizea good solution for
embedded software development
Most researchers and software engineers agree on a few desirable characteristics that every good software
design for general applications must possess. These characteristics are listed below:
Correctness:A good design should correctly implement all the functionalities identified in the SRS document.
Understand ability: A good design should be easily understandable. Unless a design solution is easily
understandable, it would be difficult to implement and maintain it.
efficiency: A good design solution should adequately address resource, time, and cost optimization issues.
Maintainability: A good design should be easy to change. This is an important requirement,
since change requests usually keep coming from the customer even after product release.
,
1.Coincidental cohesion: A module which performs a set of tasks that relate to each other very loosely called’’
Coincidental cohesion’’.. An example of a module with coincidental cohesion has been Observe that the
different functions of the module carry out very different and unrelated activities starting from issuing of library
books to creating library member records on one hand, and handling librarian leave request on the other.
2. Logical cohesion: A module which performs logical related tasks(operations, such as error handling, data
input, data output, etc.) is called logical cohesive. As an example of logical cohesion, consider amodule that
contains a set of print functions to generate various types of output reports such as grade sheets,salary slips,
annual reports, etc.
3.Temporal cohesion: A module which all the functions are executed in the same time span, then the module is
said to possess temporal cohesion. As an example, consider the following situation. When a computer is booted,
several functions need to be performed such asinitialization of memory and devices, loading the operating system,
or start-up, or shut-down of some process.
5.communication cohesion:A module is said to have communication cohesion, if all functions of the module
refer to or update the same data structure.same input data or contribute towards the same output data.
Example- update record int the database and send it to the printer.
6. sequential cohesion:A module is said to possess sequential cohesion, if the different functions of the module
execute in a sequence, and the output from one function is input to the next function in the sequence manner. As
an example consider the following situation. In an on-line store consider that after a customer requests for some
item, it is first determined if the itemis in stock. In this case, if the functions create-order(), check-item-
availability(),place-order-on-vendor() are placed in a single module, then the module would exhibit sequential
cohesion. Observe that the function create-order() creates an order that is processed by the function check-item-
availability() (whether the items are available in the required quantities in the inventory) is input to place-order-
on-vendor().
7.Functional Cohesion: Functional Cohesion is said to exist if the different functions of the module co-operate to
complete a single task. For example, a module containing all the functions required to manage employees’ pay-
roll displays functional cohesion. In this case, all the functions of the module (e.g., computeOvertime(),
computeWorkHours(), computeDeductions(), etc.) work together to generate the payslips of the employees.
Another example of a module possessing functional cohesion has been shown in In this example, the functions
issue-book(), return-book(), query-book(), and find-borrower(), together manage all activities concerned with
book lending.
Coupling:coupling between two modules is a measure of the degree of interaction (or interdependence) between
the two modules.
Data coupling: Two modules are data coupled, if they communicate using an elementary data item that is
passed as a parameter between the two, e.g. an integer, a flfloat, a character, etc. This data item should be
problem related and not used for control purposes.
Stamp coupling: Two modules are stamp coupled, if they communicate using a composite data item such as a
record in PASCAL or a structure in C.
Control coupling: Control coupling exists between two modules, if data from one module is used to direct the
order of instruction execution in another. An example of control coupling is a flflag set in one module and tested
in another module.
Common coupling: Two modules are common coupled, if they share some global data items.
Content coupling: Content coupling exists between two modules, if they share code. That is, a jump from one
module into the code of another module can occur. Modern high-level programming languages such as C do not
support such jumps across modules. The different types of coupling are shown schematically in Figure 5.5. The
degree of coupling increases from data coupling to content coupling. High coupling among modules not only
makes a design solution difficult to understand and maintain, but it also increases development effffort and also
makes it very difficult to get these modules developed independently by difffferent team members.
Function-oriented Design
The following are the salient features of the function oriented design approach:
Top-down decomposition: In top-down decomposition, starting at a high-level view of the system, each high-level
function is successively refined into more detailed functions.
For example, consider a function create-new-library member which essentially creates the record for a new member,
assigns a unique membership number to him, and prints a bill towards his membership charge. This high-level function may
be refined into the following sub functions:
create-new-library member - HL Functions„
assign-membership-number
create-member-record Sub functions:
print-bill
Each of these sub functions may be split into more detailed sub functions and so on.
Centralized system state: The system state can be defined as the values of certain data items that determine the response
of the system to a user action or external event. For example, the set of books (i.e. whether borrowed by different users or
available for issue) determines the state of a library automation system. Such data in procedural programs usually have
global scope and are shared by
many modules.For example, in the library management system, several functions such as the following
share data such as member-records for reference and updation:
„. create-new-member
„. delete-member
„. update-member-record
2.Object-oriented Design
For example, in a library automation software, each library member may be a separate object with its own data and
functions to operate on the stored data. The methods defined for one object cannot
directly refer to or change the data of other objects.
There three important concepts associated with an ADT—data abstraction, data structure, data type.
Data abstraction: The principle of data abstraction implies that how data is exactly stored
is abstracted away. This means that any entity external to the object (that is, an instance
of an ADT) would have no knowledge about how data is exactly stored, organized, and
manipulated inside the object.
Data structure: A data structure is constructed from a collection of primitive data items.Just as a civil engineer builds a large
civil engineering structure using primitive building materials such as bricks, iron rods, and cement; a programmer can
construct a data structure as an organised collection of primitive data items such as integer, floating point numbers,
characters, etc.
Data type: A type is a programming language terminology that refers to anything that can be instantiated. For example, int,
float, char, etc., are the basic data types supported by C programming language. Thus, we can say that ADTs are user defined
data types
Function-oriented techniques group functions together if, as a group, they constitutea higher level function. On the other
hand, object-oriented techniques group functionstogether on the basis of the data they operate on.
To illustrate the differences between the object-oriented and the function-oriented
design approaches, let us consider an example—that of an automated fire-alarm system
for a large building.
Automated fire-alarm system—customer requirements
The owner of a large multi-storied building wants to have a computerised fire alarm system
designed, developed, and installed in his building. Smoke detectors and fire alarms would
be placed in each room of the building. The fire alarm system would monitor the status of
these smoke detectors. Whenever a fire condition is reported by any of the smoke detectors,
the fire alarm system should determine the location at which the fire has been sensed and
then sound the alarms only in the neighbouring locations. The fire alarm system should
also flash an alarm message on the computer console. Fire fighting personnel would man
the console round the clock. After a fire condition has been successfully handled, the fire
alarm system should support resetting the alarms by the fire fighting personnel.
Function-oriented approach: In this approach, the different high-level functions are first
identified, and then the data structures are designed.
/* Global data (system state) accessible by various functions */
BOOL detector_status[MAX_ROOMS];
int detector_locs[MAX_ROOMS];
BOOL alarm-status[MAX_ROOMS]; /* alarm activated when status is set */
int alarm_locs[MAX_ROOMS]; /* room number where alarm is located */
int neighbour-alarms[MAX-ROOMS][10]; /* each detector has at most */
/* 10 neighbouring alarm locations */
int sprinkler[MAX_ROOMS];
The functions which operate on the system state are:
interrogate_detectors();
get_detector_location();
determine_neighbour_alarm();
determine_neighbour_sprinkler();
ring_alarm();
activate_sprinkler();
reset_alarm();
reset_sprinkler();
report_fire_location();
3. Consistency: Consistency refers to maintaining uniformity in design elements and interactions throughout the interface.
Elements like buttons, colors, typography, and layout should follow a consistent pattern, so users can predict how the
interface will behave. This consistency helps users develop a mental model of how the interface works)
4. Minimal Surprise: This principle involves avoiding unexpected or confusing behaviors that might surprise users. Actions and
outcomes should be aligned with user expectations to prevent frustration or confusion.
5. Recoverability: Users should be able to recover from errors or unintended actions easily. The interface should provide clear
error messages, options to undo actions, and straightforward paths to rectify mistakes.
6. User Guidance: Providing appropriate guidance and feedback to users is essential for helping them understand how to use
the interface effectively. Instructions, tooltips, and onboarding processes can assist users in navigating the interface.
7. User Diversity: Interfaces should be designed to accommodate a wide range of users, including those with varying abilities,
preferences, and cultural backgrounds. Accessibility features, localization, and customizable settings are helps to a more
inclusive user experience.
Interaction User interacts with computer using Graphics like User interacts with computer using commands
images, icons. like text.
Peripherals used Keyboard, mouse or any other pointing device. Only keyboard.
On-line help system: Users will expect the on-line help messages to be tailored in which they invoke the “help
Guidance messages: The guidance messages should be carefully designed to inform the user about the next actions
he might pursue, the current status of the system, the progress so far made in processing his last command, etc. A good
guidance system should have different levels of sophistication for different categories of users.
Error messages: Error messages are generated by a system either when the user commits some error or when some
errors encountered by the system during processing due to some exceptional conditions, such as out of memory,
communication link broken, etc. Users do not like error messages that are either ambiguous or too general such as “invalid
input or system error”. There should be good content in error messages.
The user shouldn't have to get any embarrassing background noise while receiving error and warnings from the user
interface system
How a specific mistake can be fixed should be provided in the notification. If necessary, the user should have the option of
calling up the online support system to learn more about the issue scenario.
If the user knows the correct commands then this type of interface can be much faster than
any other type of interface.
This type of interface needs much less memory (Random Access Memory) in order to use
compared to other types of user interfaces.
This type of interface does not use as much CPU processing time as others
A low resolution, cheaper monitor can be used with this type of interface.
A CLI does not require Windows to run.
Disadvantages Command Line Interface (CLI):;
For someone who has never used a CLI, it can be very confusing.
Commands have to be typed precisely. If there is a spelling mistake then the command will
not respond or fail.
If user can mis-type an instruction, it is often necessary to start from scratch again.
There are a large number of commands which need to be learned-in the case of Unix it can be
more than hundred.
Use can’t just guess what the instruction might be and user can’t just ‘have a go’.
Examples Command Line Interface (CLI):
Actions which involve logical conjunction (and)or disjunction (or) are awkward to represent
Menu systems are best suited to presenting a small number of choices. If there are many choices, some menu
structuring facility must be used
Finding content: If there are many menus and also submenus then it becomes sometimes difficult
to find the required page
Menus take large space
Slow for experienced users Can become complex if many menu options
1.Physical Metaphors Direct Manipulation Interfaces often use physical metaphors, where on-screen
elements represent real-world objects or concepts. For example, dragging and dropping a file to move it
from one folder to another mimics the physical action of moving a physical object
2.Immediate Feedback DMI provides immediate and visible feedback to user actions. When users
interact with graphical elements, they can see the results of their actions in real-time. This immediate
feedback helps users understand the cause-and-effect relationship between their actions and the
interface's response.
3.Continuous Interaction Users can manipulate objects directly using actions like clicking, dragging,
tapping, pinching, and swiping. These continuous interactions create a sense of engagement and control,
as users can directly see how their actions affect the interface.
4.Manipulation of Objects: In DMI, users interact with objects rather than issuing commands through
text-based interfaces or menus. This approach simplifies complex tasks by allowing users to manipulate
objects in a more intuitive manner.
Examples of DMI include touch interfaces on smartphones and tablets, where users
interact with objects by tapping, swiping, and pinching. Graphic design software like Adobe Photoshop
also employs DMI principles, allowing users to directly manipulate images and graphical elements with
tools like selection, painting, and transformation.
Overall, Direct Manipulation Interfaces enhance user engagement, reduce errors, and improve the
overall user experience by aligning digital interactions with real-world behaviors and expectations.
Component-based development
Visual programming
Visual programming is the drag and drop style of program development. In this style of user interface development, a
number of visual objects (icons) representing the GUI components are provided by the programming environment.
Window manager is the component of WMS with which the end-user interacts to do various window-related operations such
as window repositioning, window resizing, iconification, etc. The application programmer can easily develop the user
interface by dragging the required component types (e.g., menu, forms, etc.) from the displayed icons and placing them
wherever required.
Thus, visual programming can be considered as program development through manipulation of several visual objects.
Reuse of program components in the form of visual objects is an important aspect of this style of programming. Though
popular for user interface development, this style of programming can be used for other applications such as Computer-
Aided Design application (e.g., factory design), simulation, etc. User interface development using a visual programming
language greatly reduces the effort required to develop the interface.
Examples of popular visual programming languages are Visual Basic, Visual C++, etc.Visual C++ provides tools for
building programs with window-based user interfaces for Microsoft Windows environments. In visual C++ you usually design
menu bars, icons, and dialog boxes, etc. before adding them to your program. These objects are called as resources.
You can design shape, location, type, and size of the dialog boxes before writing any C++ code for the application.
Types of Widgets
A widget is a small, self-contained graphical element or component that serves a specific function or displays certain content
within a larger graphical user interface (GUI) or application. Widgets are designed to be interactive, allowing users to perform
actions, access information, or manipulate settings They are commonly used in technology contexts, such as on computer
desktops, mobile device home screens, web pages, and software applications, to enhance user experience and provide quick
access to frequently used features or information.
entered values can be tried without dismissing the box. Though most dialog boxes ask
you to enter some information, there are some dialog boxes which are merely informative,
alerting you to a problem with your system or an error you have made. Generally, these
boxes ask you to read the information presented and then click OK to dismiss the box.
Push button: A push button contains key words or pictures that describe the action that
is triggered when you activate the button. Usually, the action related to a push button
occurs immediately when you click a push button unless it contains an ellipsis (. . . ). A
push button with an ellipsis generally indicates that another dialog box will appear.
Radio buttons: A set of radio buttons are used when only one option has to be selected
out of many options. A radio button is a hollow circle followed by text describing the
option it stands for. When a radio button is selected, it appears filled and the previously
selected radio button from the group is unselected. Only one radio button from a group
can be selected at any time. This operation is similar to that of the band selection buttons
that were available in old radios.
Combo boxes: A combo box looks like a button until the user interacts with it. When the
user presses or clicks it, the combo box displays a menu of items to choose from. Normally
a combo box is used to display either one-of-many choices when space is limited, the
number of choices is large, or when the menu items are computed at run-time.
Unified Modeling Language (UML) is a general purpose modeling language. The main aim of UML is
to define a standard way to visualize the way a system has been designed. It is quite similar to blueprints used
in other fields of engineering. UML is not a programming language, it is rather a visual language. We use UML
diagrams to portray the behavior and structure
of a system.
UML helps software engineers, businessmen and system architects with modeling, design and analysis. The
Object Management Group (OMG) adopted Unified Modelling Language as a standard in 1997. Its been
managed by OMG ever since. International Organization for Standardization (ISO) published UML as an
approved standard in 2005. UML has been revised over the years and is reviewed periodically.
Goals of UML
A picture is worth a thousand words, this idiom absolutely fits describing UML. Object-oriented concepts were introduced
much earlier than UML. At that point of time, there were no standard methodologies to organize and consolidate the object-
oriented development. It was then that UML came into picture.
There are a number of goals for developing UML but the most important is to define some general purpose modeling
language, which all modelers can use and it also needs to be made simple to understand and use.
UML diagrams are not only made for developers but also for business users, common people, and anybody interested to
understand the system. The system can be a software or non-software system. Thus it must be clear that UML is not a
development method rather it accompanies with processes to make it a successful system.
In conclusion, the goal of UML can be defined as a simple modeling mechanism to model all possible practical systems in
today’s complex environment.
UML is a modeling language used to model software and non-software systems. Although UML is used for non-software
systems, the emphasis is on modeling OO software applications. Most of the UML diagrams discussed so far are used to
model different aspects such as static, dynamic, etc.
Hence, the relation between OO design and UML is very important to understand. The OO design is transformed into
UML diagrams according to the requirement. Before understanding the UML in detail, the OO concept should be learned
properly. Once the OO analysis and design is done, the next step is very easy. The input from OO analysis and design is the
input to UML diagrams.
Things
Relationships
Diagrams
Things
Things are the most important building blocks of UML. Things can be −
Structural
Behavioral
Grouping
Annotational
2.Relationship is another most important building block of UML. It shows how the elements are associated with each other
3.UML Diagrams
UML diagrams are the ultimate output of the entire discussion. All the elements, relationships are used to make a complete
UML diagram and the diagram represents a system.
The visual effect of the UML diagram is the most important part of the entire process. All the other elements are used to
make it complete.
Things
Relationships
Diagrams
Things
Things are the most important building blocks of UML. Things can be −
Structural
Behavioral
Grouping
Annotational
Structural Things
Structural things define the static part of the model. They represent the physical and conceptual elements.
Following are the brief descriptions of the structural things.
Interface − Interface defines a set of operations, which specify the responsibility of a class.
Use case −Use case represents a set of actions performed by a system for a specific goal.
Node − A node can be defined as a physical element that exists at run time.
Behavioral Things
A behavioral thing consists of the dynamic parts of UML models. Following are the behavioral things −
Interaction − Interaction is defined as a behavior that consists of a group of messages exchanged among elements
to accomplish a specific task.
State machine − State machine is useful when the state of an object in its life cycle is important. It defines the
sequence of states an object goes through in response to events. Events are external factors responsible for state
change
Grouping Things
Grouping things can be defined as a mechanism to group elements of a UML model together. There is only one
grouping thing available −
Package − Package is the only one grouping thing available for gathering structural and behavioral things.
Annotational Things
Annotational things can be defined as a mechanism to capture remarks, descriptions, and comments of UML
model elements. Note - It is the only one Annotational thing available. A note is used to render comments,
constraints, etc. of an UML element.
Relationship
Relationship is another most important building block of UML. It shows how the elements are associated with
each other and this association describes the functionality of an application.
Dependency
Dependency is a relationship between two things in which change in one element also affects the other.
Association
Association is basically a set of links that connects the elements of a UML model. It also describes how many
objects are taking part in that relationship.
Generalization
Generalization can be defined as a relationship which connects a specialized element with a generalized element.
It basically describes the inheritance relationship in the world of objects.
Realization
Realization can be defined as a relationship in which two elements are connected. One element describes some
responsibility, which is not implemented and the other one implements them. This relationship exists in case of
interfaces.
UML Diagrams
UML diagrams are the ultimate output of the entire discussion. All the elements, relationships are used to make a
complete UML diagram and the diagram represents a system.
The visual effect of the UML diagram is the most important part of the entire process. All the other elements are
used to make it complete.
UML includes the following nine diagrams, the details of which are described in the subsequent chapters.
Class diagram
Object diagram
Use case diagram
Sequence diagram
Collaboration diagram
Activity diagram
State chart diagram
Deployment diagram
Component diagram
UML basic notations :UML is popular for its diagrammatic notations. We all know that UML is for
visualizing, specifying, constructing and documenting the components of software and non-software
systems. Hence, visualization is the most important part which needs to be understood and
remembered.
UML notations are the most important elements in modeling. Efficient and appropriate use of
notations is very important for making a complete and meaningful model.
Class Notation
UML class is represented by the following figure. The diagram is divided into four parts.
Classes are used to represent objects. Objects can be anything having properties and responsibility.
Object Notation
The object is represented in the same way as the class. The only difference is the name which is
underlined as shown in the following figure.
As the object is an actual implementation of a class, which is known as the instance of a class. Hence, it
has the same usage as the class.
Interface Notation
Interface is represented by a circle as shown in the following figure. It has a name which is generally
written below the circle.
Interface is used to describe the functionality without implementation. Interface is just like a template
where you define different functions, not the implementation. When a class implements the interface, it
also implements the functionality as per requirement.
Collaboration Notation
Collaboration is represented by a dotted eclipse as shown in the following figure. It has a name written
inside the eclipse.
Actor Notation
An actor can be defined as some internal or external entity that interacts with the system.
An actor is used in a use case diagram to describe the internal or external entities.
The usage of Initial State Notation is to show the starting point of a process.
The usage of Final State Notation is to show the termination point of a process.
Component Notation
A component in UML is shown in the following figure with a name inside. Additional elements can be
added wherever required.
Component is used to represent any part of a system for which UML diagrams are made.
Node Notation
A node in UML is represented by a square box as shown in the following figure with a name. A node
represents the physical component of the system.
Node is used to represent the physical part of a system such as the server, network, etc
Behavioral Things
Dynamic parts are one of the most important elements in UML. UML has a set of powerful features to
represent the dynamic part of software and non-software systems. These features
include interactions and state machines.
Interactions can be of two types −
State machine is used to describe different states of a system component. The state can be active, idle,
or any other depending upon the situation.
Grouping Things
Organizing the UML models is one of the most important aspects of the design. In UML, there is only
one element available for grouping and that is package.
Package Notation
Package notation is shown in the following figure and is used to wrap the components of a system.
Annotational Things
In any diagram, explanation of different elements and their functionalities are very important. Hence,
UML has notes notation to support this requirement.
Note Notation
This notation is shown in the following figure. These notations are used to provide necessary
information of a system.
Relationships
A model is not complete unless the relationships between elements are described properly.
The Relationship gives a proper meaning to a UML model. Following are the different types of
relationships available in UML.
Dependency
Association
Generalization
Extensibility
Dependency Notation
Dependency is an important aspect in UML elements. It describes the dependent elements and the
direction of dependency.
Dependency is represented by a dotted arrow as shown in the following figure. The arrow head
represents the independent element and the other end represents the dependent element.
Generalization Notation
Generalization describes the inheritance relationship of the object-oriented world. It is a parent and
child relationship.
Generalization is represented by an arrow with a hollow arrow head as shown in the following figure.
One end represents the parent element and the other end represents the child element.
Extensibility Notation
All the languages (programming or modeling) have some mechanism to extend its capabilities such as
syntax, semantics, etc. UML also has the following mechanisms to provide extensibility features.
Extensibility notations are used to enhance the power of the language. It is basically additional elements
used to represent some extra behavior of the system. These extra behaviors are not covered by the
standard available notations.
UML-Diagrams
The UML diagrams are categorized into structural diagrams, behavioral diagrams, and also
interaction overview diagrams. The diagrams are hierarchically classified in the following figure:
Q.State the purpose of Class diagram and draw simple class diagrams?
Class diagram is a static diagram. It represents the static view of an application. Class diagram is not only used for
visualizing, describing, and documenting different aspects of a system but also for constructing executable code of the
software application.
Class diagram describes the attributes and operations of a class and also the constraints imposed on the system. The class
diagrams are widely used in the modeling of object-oriented systems because they are the only UML diagrams, which can be
mapped directly with object-oriented languages.
Class diagram shows a collection of classes, interfaces, associations, collaborations, and constraints. It is also known as a
structural diagram.
Q.What is Use case diagram ? State the purpose of Use case diagram and draw simple example of Use
case diagram?
Use case diagram, define the term Use case, purposes of Use case diagram, draw the Use case diagram
A use case diagram is a type of diagram in UML (Unified Modeling Language) that is used to visualize the
functional requirements and interactions of a system from a user's perspective. It depicts the various use cases,
actors, and their relationships within a system
Purpose of Use Case Diagrams
The purpose of use case diagram is to capture the dynamic aspect of a system. Use case diagrams are used to
gather the requirements of a system including internal and external influences. These requirements are mostly
design requirements. Hence, when a system is analyzed to gather its functionalities, use cases are prepared and
actors are identified.
A simple example of a use case diagram for an ATM (Automated Teller Machine) system:
Actors:
Customer (Primary user)
Bank (System)
Use Cases:
Withdraw Cash: The customer can withdraw cash from their account.
Check Balance: The customer can check their account balance.
Deposit Funds: The customer can deposit money into their account.
Change PIN: The customer can change their PIN (Personal Identification Number).
Provide Receipt: The ATM provides a receipt for transactions.
Authenticate User: The system authenticates the user's identity.
Associations:
The "Customer" actor is associated with all use cases because the customer initiates all interactions.
The "Bank" actor is associated with the "Authenticate User" use case, as it is responsible for authenticating the
user's identity.
Use Case Diagram:
In this use case diagram, you can see how the customer interacts with the ATM system through various use cases.
The "Customer" actor initiates these interactions, and the "Bank" actor is responsible for authenticating the user's
identity. Each use case represents a specific functionality of the ATM system. This diagram provides a high-level
overview of the ATM's functionality and its interactions with users.
Interaction diagram, purposes of Interaction diagram, the types of interaction diagrams : Sequence diagram and
Collaboration diagram, draw the Interaction diagrams.
Interaction diagrams are used to visualize the dynamic behavior of a system, showing how objects interact
with each other to achieve a specific goal.
The purpose of interaction diagram is :
• To capture the dynamic behaviour of a system.
• To describe the message flow in the system.
• To describe the structural organization of the objects.
• To describe the interaction among objects
There are two main types of interaction diagrams in UML: Sequence Diagrams and Collaboration Diagrams.
1.The Sequence Diagram
The sequence diagram has four objects (Customer, Order, SpecialOrder and NormalOrder).
The following diagram shows the message sequence for SpecialOrder object and the same can be used in case
of NormalOrder object. It is important to understand the time sequence of message flows. The message flow is
nothing but a method call of an object.
The first call is sendOrder () which is a method of Order object. The next call is confirm () which is a method
of SpecialOrder object and the last call is Dispatch () which is a method of SpecialOrder object. The following
diagram mainly describes the method calls from one object to another, and this is also the actual scenario when
the system is running.
The second interaction diagram is the collaboration diagram. It shows the object organization as seen in the
following diagram. In the collaboration diagram, the method call sequence is indicated by some numbering
technique. The number indicates how the methods are called one after another. We have taken the same order
management system to describe the collaboration diagram.
Method calls are similar to that of a sequence diagram. However, difference being the sequence diagram does
not describe the object organization, whereas the collaboration diagram shows the object organization.
To choose between these two diagrams, emphasis is placed on the type of requirement. If the time sequence is
important, then the sequence diagram is used. If organization is required, then collaboration diagram is used.