Difficulty of Classification
Difficulty of Classification
Difficulty of Classification
Difficulty of Classification
Classification is hard!
Linnaeus is the prototypical classifier, responsible for the taxonomy of living
organisms. He developed the concepts of genus and species to help us categorize plants
and animals. Linnaeus used properties he could directly observe, such as fruit and leaf
shape. Modern work has used concepts from evolutionary theories to determine
classification, rather than merely considering structural organization.
One must not forget that in this and other classification efforts, that classification is not
carried out in some purely rational objective sense. We must have a reason for
classifying, and that reason will affect the results of our classification task.
Classification over time involves iteration and incremental refinement. The same is true
of software engineering processes.
The classical categorization approach comes initially from Plato's concept of the ideals.
This philosophical concept captures the idea that categories are specified by an
objectively determinable collection of properties that characterize each of the elements
of the category. Each object sharing the properties is in the category and all objects in
the category share the property.
Classical categorization was accepted as the one, true method of categorization until
nearly this century during which time it was discovered that many of the categories we
use every day do not satisfy the strict constraints of sharing a common set of properties.
Not all birds fly, some chairs are purely ornamental and no one will ever sit in such a
chair.
Conceptual Clustering
when spoken by a biological mother makes sense to us, indicating that the
category mother has many different kinds of interpretations.
The pragmatic and cultural nature of these categories, likewise distinguishes them from
the Platonic ideal categories which are presumed to be completely objective in nature.
In prototype categorization the relation between the central elements and the non-
central ones may be giving by a generative rule, by a connective principal, or by some
other means.
Object-Oriented Analysis
In Analysis, we try to discover the classes and objects that comprise the vocabulary of
the problem domain. A number of approaches have been used in carrying out this task.
Classical Approaches
o nouns
o adjectives
o verbs
The behavior analysis is mor akin to conceptual clustering and consists of classifying
objects according to common behavior.
Centering on the idea of responsibilities (or the services an object provides for all
contracts it supports) conveys the conceptual cluster basis.
The notion of a function point or single end-user transaction is often used to
characterize the analysis view of responsibilities.
Domain Analysis
The goal in domain analysis is to find classes and objects that are common to all
systems dealing with problems in the same domain, then consider those which are
specific to the problem at hand.
One benefit of domain analysis is that it supports the possibility of generating more
general classes which can be reused in a variety of specific problm instances.
Domain analysis requires a domain expert. Booch notes "It is truly amazing to see what
a little bit of domain knowledge can do to assist a developer in making intelligent
design decisions.
Use-Case Analysis
Introduced by Jacobson
A use-case is a "particular form or pattern or exemplar of usage, a scenario that begins
with some user of the system initiating some transaction or sequence of interrelated
events.
In analysis, we may enumerate the use-cases that are fundamental to the operation of
the system.
As development proceeds, the team walks through each scenario identifying the
participant objects and their responsibilities, and the collaborations in which these
objects participate.
CRC Cards
Structured analysis is a technique that has been used to develop programs using
concepts of structured programming, which, as we have previously noted has a
procedural basis.
The SA method typically describes a system with dataflow diagrams which result from
analysis activities similar to the O-O methods described above.
O-O elements can be retrieved from SA designs by scavenging the data dictionary for
objects, and by analyzing the dataflow diagrams to identify
o external entities
o data stores
o control stores
o control transformations
Actor
An actor represents the roles that the users of the use cases play. An actor may be a person (e.g. student,
customer), a device (e.g. workstation), or another system (e.g. bank, institution).
The following figure shows the notations of an actor named Student and a use case called Generate
Performance Report.
Use cases
Actors
Relationships like dependency, generalization, and association
Use case diagrams are used −
To model the context of a system by enclosing all the activities of a system within a rectangle and
focusing on the actors outside the system by interacting with it.
To model the requirements of a system from the outside point of view.
Example
Let us consider an Automated Trading House System. We assume the following features of the system −
The trading house has transactions with two types of customers, individual customers and
corporate customers.
Once the customer places an order, it is processed by the sales department and the customer is
given the bill.
The system allows the manager to manage customer accounts and answer any queries posted by
the customer.
Interaction Diagrams
Interaction diagrams depict interactions of objects and their relationships. They also include the
messages passed between them. There are two types of interaction diagrams −
Sequence Diagrams
Collaboration Diagrams
Sequence Diagrams
Sequence diagrams are interaction diagrams that illustrate the ordering of messages according to time.
Notations − These diagrams are in the form of two-dimensional charts. The objects that initiate the
interaction are placed on the x–axis. The messages that these objects send and receive are placed along
the y–axis, in the order of increasing time from top to bottom.
Example − A sequence diagram for the Automated Trading House System is shown in the following
figure.
Collaboration Diagrams
Collaboration diagrams are interaction diagrams that illustrate the structure of the objects that send and
receive messages.
Notations − In these diagrams, the objects that participate in the interaction are shown using vertices.
The links that connect the objects are used to send and receive messages. The message is shown as a
labeled arrow.
Example − Collaboration diagram for the Automated Trading House System is illustrated in the figure
below.
State–Chart Diagrams
A state–chart diagram shows a state machine that depicts the control flow of an object from one state to
another. A state machine portrays the sequences of states which an object undergoes due to events and
their responses to events.
State–Chart Diagrams comprise of −
Activity Diagrams
An activity diagram depicts the flow of activities which are ongoing non-atomic operations in a state
machine. Activities result in actions which are atomic operations.
Activity diagrams comprise of −
Use-Case Model
The Use-case model is defined as a model which is used to show how users interact with the system in
order to solve a problem. As such, the use case model defines the user's objective, the interactions
between the system and the user, and the system's behavior required to meet these objectives.
Various model elements are contained in use-case model, such as actors, use cases, and the association
between them.
We use a use-case diagram to graphically portray a subset of the model in order to make the
communication simpler. There will regularly be a numerous use-case diagram which is related to the
given model, each demonstrating a subset of the model components related to a specific purpose. A
similar model component might be appearing on a few use-case diagrams; however, each use-case should
be consistent. If, in order to handle the use-case model, tools are used then this consistency restriction is
automated so that any variations to the component of the model (changing the name, for instance) will be
reflected automatically on each use-case diagram, which shows that component.
Packages may include a use-case model, which is used to organize the model to simplify the analysis,
planning, navigation, communication, development and maintenance.
46.4M
749
Various use-case models are textual and the text captured in the use-case specifications, which are linked
with the element of every use-case model. The flow of events of the use case is described with the help of
these specifications.
The use-case model acts as an integrated thread in the development of the entire system. The use-case
model is used like the main specification of the system functional requirements as the basis for design and
analysis, as the basis for user documentation, as the basis of defining test cases, and as an input to
iteration planning.
Origin of Use-Case
Nowadays, use case modeling is frequently connected with UML, in spite of the fact that it has been
presented before UML existed. Its short history is:
o Ivar Jacobson, in the year 1986, originally formulated textual and visual modeling methods to specify use
cases.
o And in the year 1992, his co-authored book named Object-Oriented Software Engineering - A Use Case
Driven Approach, assisted with promoting the strategy for catching functional requirements, particularly in
software development.
Components of Basic Model
There are various components of the basic model:
1. Actor
2. Use Case
3. Associations
Actor
Usually, actors are people involved with the system defined on the basis of their roles. An actor can be
anything such as human or another external system.
Use Case
The use case defines how actors use a system to accomplish a specific objective. The use cases are
generally introduced by the user to meet the objectives of the activities and variants involved in the
achievement of the goal.
Associations
Associations are another component of the basic model. It is used to define the associations among actors
and use cases they contribute in. This association is called communicates-association.
1. Subject
2. Use-Case Package
3. Generalizations
4. Generalizations
5. Dependencies
Subject
The subject component is used to represent the boundary of the system of interest.
Use-Case Package
We use the model component in order to structure the use case model to make simpler the analysis,
planning, navigation, and communication. Suppose there are various actors or use cases. In that case, we
can also use use-case packages in order to further structure the use-case model in much the similar way
we use directories or folders to organize the information on our hard-disk.
For various reasons, we divide the use-case model into the use-case packages, containing:
o To help parallel development by partitioning the problem into bite-sized parts.
o To improve communication with various stakeholders by making packaging containing actors, use cases
and related to the specific stakeholder.
Generalizations
Generalizations mean the association between the actors in order to help re-use of common properties.
Dependencies
In UML, various types of dependencies are defined between use cases. In particular, <<include>> and
<<extend>>.
We use <<include>> dependency to comprise shared behavior from an included use case into a base use
case to use common behavior.
We use <<extend>> dependency to include optional behavior from an extended use-case into an extended
use case.
A use case means essential functionality of any working system. When we organize the use cases, then
next we need to enlist the numerous actors or things that will collaborate with the system. These actors
are used to implement the functionality of a system. Actors can be someone or something. It can likewise
be a private system's entity. The actors should be pertinent to the functionality or a system in which the
actors are interacting.
When we enlist the use cases and actors, then next, we need to find the relationship of a specific actor
with the system or a use case. An actor should find the total number of ways in order to cooperate with
the system. One actor can interact with the numerous use cases simultaneously, or it may interact with the
multiple-use cases concurrently.
We have to follow the following rules while drawing use-case for any framework:
o The use case name and actor name should be meaningful and related to the system.
o The actor's interaction with the use case should be well-described and in a comprehensible manner.
o Use annotations wherever they are essential.
o If the actor or use case has many relationships, then display only important interactions.
With the help of the use-case diagram, we can characterize the system's main part and flow of work
among them. In the use-case, the implementation of details is hidden from external use, and only the flow
of the event is represented.
Using use-case diagrams, we can detect the pre-and post-conditions after communication with the actor.
We can determine these conditions using several test cases.
Use cases are planned to convey wanted functionality so that the exact scope of use case can differ based
on the system and the purpose of making the UML model.
o It must be complete.
o It must be simple.
o The use-case diagram must show each and every interaction with the use case.
o It is must that the use-case should be generalized if it is large.
o At least one system module must be defined in the use case diagram.
o When there are number of actors or use-cases in the use-case diagram, only the significant use-cases must
be represented.
o The use-case diagrams must be clear and easy so that anyone can understand them easily.
o Use-case diagram provides an outline related to all components in the system. Use-case diagram helps to
define the role of administrators, users, etc.
o The use-Case diagram helps to provide solutions and answers to various questions that may pop up if you
begin a project unplanned.
o It helps us to define the needs of the users extensively and explore how it will work.
System
With the help of the rectangle, we can draw the boundaries of the system, which includes use-cases. We
need to put the actors outside the system's boundaries.
Use-Case
With the help of the Ovals, we can draw the use-cases. With the verb we have to label the ovals in order
to represent the functions of the system.
Actors
Actors mean the system's users. If one system is the actor of the other system, then with the actor
stereotype, we have to tag the actor system.
Relationships
With the simple line we can represent relationships between an actor and use cases. For relationships
between use-case, we use arrows which are labeled either "extends" or "uses". The "extends" relationship
shows the alternative options under the specific use case. The "uses" relationship shows that single use-
case is required to accomplish a job.
Generally, the use-case diagram contains use-cases, relationships, and actors. Systems and boundaries
may be included in the complex larger diagrams. We'll talk about the guidelines of the use-case diagram
on the basis of the objects.
Do not forget that these are the use case diagram's guidelines, not rules of the use-case diagram.
Actors
o The actor's name should be meaningful and relevant to the business
If the use-case interacting with the outside organization, then we have to give the actor's name with the
function instead of the organization name, such as Airline company is better than the PanAir).
o Place inheriting actors below the parent actor
We have to place the inheriting actors below the parent actor because it makes the actors more readable and
easily highlights the use-cases, which are exact for that actor.
o External Systems are actors
If send-email is our use-case and when the use-case interrelates with the email management software, then
in this case, the software is an actor to that specific user-case.
Use-Cases
Systems/Packages
Relationships
o When we are using <<extend>> arrow, points to the base use-case.
o When we are using <<include>> then arrow points to the comprised use-case.
o Actor and use-case relationship do not display arrows.
o <<extend>> may have an optional extension condition.
o <<include>> and <<extend>> both are shown as dashed arrows.
Use-Case Examples
Use-Case Example-Association Link
In this use-case diagram, we show a group of use cases for a system which means the relationship among
the use-cases and the actor.
It is not must that every actor has to interact with each and every use-case, but it can happen.
A Class Responsibility Collaborator (CRC) model (Beck & Cunningham 1989; Wilkinson 1995; Ambler 1995) is a collection
of standard index cards that have been divided into three sections, as depicted in Figure 1. A class represents a collection of
similar objects, a responsibility is something that a class knows or does, and a collaborator is another class that a class interacts
with to fulfill its responsibilities. Figure 2 presents an example of two hand-drawn CRC cards.
A class represents a collection of similar objects. An object is a person, place, thing, event, or concept that is relevant to the
system at hand. For example, in a university system, classes would represent students, tenured professors, and seminars. The
name of the class appears across the top of a CRC card and is typically a singular noun or singular noun phrase, such
as Student, Professor, and Seminar. You use singular names because each class represents a generalized version of a singular
object. Although there may be the student John O'Brien, you would model the class Student. The information about a student
describes a single person, not a group of people. Therefore, it makes sense to use the name Student and not Students. Class
names should also be simple. For example, which name is better: Student or Person who takes seminars?
A responsibility is anything that a class knows or does. For example, students have names, addresses, and phone numbers.
These are the things a student knows. Students also enroll in seminars, drop seminars, and request transcripts. These are the
things a student does. The things a class knows and does constitute its responsibilities. Important: A class is able to change the
values of the things it knows, but it is unable to change the values of what other classes know.
Sometimes a class has a responsibility to fulfill, but not have enough information to do it. For example, as you see in Figure
3 students enroll in seminars. To do this, a student needs to know if a spot is available in the seminar and, if so, he then needs
to be added to the seminar. However, students only have information about themselves (their names and so forth), and not
about seminars. What the student needs to do is collaborate/interact with the card labeled Seminar to sign up for a seminar.
Therefore, Seminar is included in the list of collaborators of Student.
Collaboration takes one of two forms: A request for information or a request to do something. For example, the
card Student requests an indication from the card Seminar whether a space is available, a request for information. Student then
requests to be added to the Seminar, a request to do something. Another way to perform this logic, however, would have been
to have Student simply request Seminar to enroll himself into itself. Then have Seminar do the work of determining if a seat is
available and, if so, then enrolling the student and, if not, then informing the student that he was not enrolled.
So how do you create CRC models? Iteratively perform the following steps:
Find classes. Finding classes is fundamentally an analysis task because it deals with identifying the building blocks
for your application. A good rule of thumb is that you should look for the three-to-five main classes right away, such
as Student, Seminar, and Professor in Figure 4. I will sometimes include UI classes such as Transcript and Student
Schedule, both are reports, although others will stick to just entity classes. Also, I'll sometimes include cards
representing actors when my stakeholders are struggling with the concept of a student in the real world (the actor)
versus the student in the system (the entity).
Find responsibilities. You should ask yourself what a class does as well as what information you wish to maintain
about it. You will often identify a responsibility for a class to fulfill a collaboration with another class.
Define collaborators. A class often does not have sufficient information to fulfill its responsibilities. Therefore, it
must collaborate (work) with other classes to get the job done. Collaboration will be in one of two forms: a request for
information or a request to perform a task. To identify the collaborators of a class for each responsibility ask yourself
"does the class have the ability to fulfill this responsibility?". If not then look for a class that either has the ability to
fulfill the missing functionality or the class which should fulfill it. In doing so you'll often discover the need for new
responsibilities in other classes and maybe even the need for a new class or two.
Move the cards around. To improve everyone's understanding of the system, the cards should be placed on the table
in an intelligent manner. Two cards that collaborate with one another should be placed close together on the table,
whereas two cards that don't collaborate should be placed far apart. Furthermore, the more two cards collaborate, the
closer they should be on the desk. By having cards that collaborate with one another close together, it's easier to
understand the relationships between classes.
How do you keep your CRC modeling efforts agile? By following the AM practice Model in Small Increments. The best way
to do this is to create a CRC model for a single requirement, such as a user story, business rule, or system use case, instead of
the entire collection of requirements for your system. Because CRC cards are very simple tools they are inclusive, enabling
you to follow AM's Active Stakeholder Participation practice.
It's important to recognize that a CRC model isn't carved in stone. When you evolve it into a UML class diagram, or perhaps
straight into code, you'll change the schema over time. Responsibilities will be reorganized, new classes will be introduced,
existing classes will disappear, and so on. This is what happens when you take an evolutionary approach to development.
Analysts use various tools to understand and describe the information system. One of the ways is using
structured analysis.
Types of DFD
DFDs are of two types: Physical DFD and Logical DFD. The following table lists the points that
differentiate a physical DFD from a logical DFD.
It provides low level details of hardware, It explains events of systems and data required by
software, files, and people. each event.
It depicts how the current system operates and It shows how business operates; not how the
how a system will be implemented. system can be implemented.
Context Diagram
A context diagram helps in understanding the entire system by one DFD which gives the overview of a
system. It starts with mentioning major processes with little details and then goes onto giving more
details of the processes with the top-down approach.
The context diagram of mess management is shown below.
Data Dictionary
A data dictionary is a structured repository of data elements in the system. It stores the descriptions of all
DFD data elements that is, details and definitions of data flows, data stores, data stored in data stores,
and the processes.
A data dictionary improves the communication between the analyst and the user. It plays an important
role in building a database. Most DBMSs have a data dictionary as a standard feature. For example, refer
the following table −
2 TITLE title 60
Decision Trees
Decision trees are a method for defining complex relationships by describing decisions and avoiding the
problems in communication. A decision tree is a diagram that shows alternative actions and conditions
within horizontal tree framework. Thus, it depicts which conditions to consider first, second, and so on.
Decision trees depict the relationship of each condition and their permissible actions. A square node
indicates an action and a circle indicates a condition. It forces analysts to consider the sequence of
decisions and identifies the actual decision that must be made.
The major limitation of a decision tree is that it lacks information in its format to describe what other
combinations of conditions you can take for testing. It is a single representation of the relationships
between conditions and actions.
For example, refer the following decision tree −
Decision Tables
Decision tables are a method of describing the complex logical relationship in a precise manner which is
easily understandable.
It is useful in situations where the resulting actions depend on the occurrence of one or several
combinations of independent conditions.
It is a matrix containing row or columns for defining a problem and the actions.
Purchase amount = Rs - Y Y N
10,000/-
Regular Customer - Y N -
ACTIONS
Give 5% discount X X - -
Give no discount - - X X
Structured English
Structure English is derived from structured programming language which gives more understandable
and precise description of process. It is based on procedural logic that uses construction and imperative
sentences designed to perform operation for action.
It is best used when sequences and loops in a program must be considered and the problem needs
sequences of actions with decisions.
It does not have strict syntax rule. It expresses all logic in terms of sequential decision structures
and iterations.
For example, see the following sequence of actions −
if customer pays advance
then
Give 5% Discount
else
if purchase amount >=10,000
then
if the customer is a regular customer
then Give 5% Discount
else No Discount
end if
else No Discount
end if
end if
Pseudocode
A pseudocode does not conform to any programming language and expresses logic in plain English.
It may specify the physical programming logic without actual coding during and after the physical
design.
It is used in conjunction with structured programming.
It replaces the flowcharts of a program.
Key abstractions
Key abstractions are the key concepts and abstractions that the system needs to handle. They are those
things that, without which, you could not describe the system.
The requirements are good sources for key abstractions. These abstractions are often easily identified
because they represent things that are significant to the business. For example, Customer and Account are
typical key abstractions in the banking business.
Each key abstraction should have a short description. The are usually not described in detail as they will
change and evolve during the course of the project (as they are refined into actual design elements).
The value of defining the key abstractions (and any obvious relationships between them) is that they
establish a common understanding of the key concepts amongst the team, thereby enabling them to develop
a coherant solution that handles them consistently.
Identify Analysis Mechanisms:
The purpose of this step is to "prime the pump" for analysis by identifying and defining
the key abstractions that the system must handle. These may have been initially
identified during business modeling and requirement activities. However, during those
activities, the focus was on the problem domain. During analysis and design, our focus
is more on the solution domain.
What are key abstractions:
o A key abstraction is a concept, normally uncovered in Requirements, that the
system must be able to handle.
o Sources for key abstractions:
Domain knowledge
Requirements
Glossary
Domain Model, or the Business Model (if one exists)
Defining key abstractions:
o Define analysis classes: The purpose of this step is not to identify a set of classes
that will survive throughout design, but to identify the key abstractions the
system must handle. Do not spend much time describing analysis classes in
detail at this initial stage, because there is a risk that you might identify classes
and relationships that are not actually needed by the use cases. Remember that
you will find more analysis classes and relationships when looking at the use
cases.
o Model analysis classes and relationships on class diagrams:
Include a brief description of an analysis class
o Map analysis classes to necessary analysis mechanisms
Key abstractions for the Course Registration System:
Create Use-Case Realizations:
General:
o Is the package partitioning and layering done in a logically consistent way?
o Have the necessary analysis mechanisms been identified?
Packages:
o Have we provided a comprehensive picture of the services of the packages in
upper-level layers?
Classes:
o Have the key entity classes and their relationships been identified and accurately
modeled?
o Does the name of each class clearly reflect the role it plays?
o Are the key abstractions/classes and their relationships consistent with the
Business Model, Domain Model, Requirements, Glossary, etc.?