Professional Documents
Culture Documents
SE Unit III V
SE Unit III V
Abstraction
Abstraction refers to a powerful design tool, which allows software designers to consider
components at an abstract level, while neglecting the implementation details of the
components. IEEE defines abstraction as ‘a view of a problem that extracts the
essential information relevant to a particular purpose and ignores the remainder of
the information.’ The concept of abstraction can be used in two ways: as a process and as
an entity. As a process, it refers to a mechanism of hiding irrelevant details and
representing only the essential features of an item so that one can focus on important
things at a time. As an entity, it refers to a model or view of an item.
Details of the data elements are not visible to the users of data. Data Abstraction
forms the basis for Object Oriented design approaches.
Data abstraction: This involves specifying data that describes a data object.
For example, the data object window encompasses a set of attributes
(window type, window dimension) that describe the window object clearly. In
this abstraction mechanism, representation and manipulation details are
ignored.
Control abstraction: This states the desired effect, without stating the exact
mechanism of control. For example, if and while statements in programming
languages (like C and C++) are abstractions of machine code
implementations, which involve conditional instructions. In the architectural
design level, this abstraction mechanism permits specifications of sequential
subprogram and exception handlers without the concern for exact details of
implementation.
Modularity
Modularity specifies to the division of software into separate modules which are
differently named and addressed and are integrated later on in to obtain the
completely functional software. It is the only property that allows a program to be
intellectually manageable. Single large programs are difficult to understand and
read due to a large number of reference variables, control paths, global variables,
etc.
Software Architecture,
The software architecture of a system depicts the system’s organization or structure, and provides
an explanation of how it behaves. A system represents the collection of components that accomplish
a specific function or set of functions. In other words, the software architecture provides a sturdy
foundation on which software can be built. A series of architecture decisions and trade-offs impact
quality, performance, maintainability, and overall success of the system. Failing to consider
common problems and long-term consequences can put your system at risk. There are multiple
high-level architecture patterns and principles commonly used in modern systems. These are often
referred to as architectural styles. The architecture of a software system is rarely limited to a single
architectural style. Instead, a combination of styles often make up the complete system.
Types of Cohesion:
Functional Cohesion: Every essential element for a single computation
is contained in the component. A functional cohesion performs the task
and functions. It is an ideal situation.
Sequential Cohesion: An element outputs some data that becomes the
input for other element, i.e., data flow between the parts. It occurs
naturally in functional programming languages.
Communicational Cohesion: Two elements operate on the same input
data or contribute towards the same output data. Example- update
record in the database and send it to the printer.
Procedural Cohesion: Elements of procedural cohesion ensure the
order of execution. Actions are still weakly connected and unlikely to be
reusable. Ex- calculate student GPA, print student record, calculate
cumulative GPA, print cumulative GPA.
Temporal Cohesion: The elements are related by their timing involved.
A module connected with temporal cohesion all the tasks must be
executed in the same time span. This cohesion contains the code for
initializing all the parts of the system. Lots of different activities occur, all
at unit time.
Logical Cohesion: The elements are logically related and not
functionally. Ex- A component reads inputs from tape, disk, and
network. All the code for these functions is in the same component.
Operations are related, but the functions are significantly different.
Coincidental Cohesion: The elements are not related(unrelated). The
elements have no conceptual relationship other than location in source
code. It is accidental and the worst form of cohesion. Ex- print next line
and reverse the characters of a string in a single component.
Refactoring,
Refactoring is the process of restructuring code, while not changing its original
functionality. The goal of refactoring is to improve internal code by making
many small changes without altering the code's external behavior.
The refactoring process features many small changes to a program's source code.
One approach to refactoring, for example, is to improve the structure of source
code at one point and then extend the same changes systematically to all
applicable references throughout the program. The thought process is that all the
small, behavior-preserving changes to a body of code have a cumulative effect.
These changes preserve the software's original behavior and do not modify its
behavior.
Easier for software developers to find and fix bugs or vulnerabilities in the
code.
Structured Analysis,
It provides low level details of hardware, It explains events of systems and data
software, files, and people. required by each event.
It depicts how the current system operates It shows how business operates; not how the
and how a system will be implemented. system can be implemented.
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.
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.
Components of a Decision Table
Condition Stub − It is in the upper left quadrant which lists all the condition
to be checked.
Action Stub − It is in the lower left quadrant which outlines all the action to
be carried out to meet such condition.
Condition Entry − It is in upper right quadrant which provides answers to
questions asked in condition stub quadrant.
Action Entry − It is in lower right quadrant which indicates the appropriate
action resulting from the answers to the conditions in the condition entry
quadrant.
The entries in decision table are given by Decision Rules which define the
relationships between combinations of conditions and courses of action. In rules
section,
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.
There are five different views that the UML aims to visualize through different
modeling diagrams. These five views are:
1. User's View
2. Structural Views
3. Behavioral Views
4. Environmental View
5. Implementation View
Now, these views just provide the thinking methodology and expectations (that
people have formed the software) of different groups of people. However, we still
need to diagrammatically document the system requirements, and this is done
through 9 different types of UML diagrams. These diagrams are divided into
different categories. These categories are nothing else but these views that we
mentioned earlier.
The different software diagrams according to the views they implement are:
1) User's view
This contains the diagrams in which the user's part of interaction with the software
is defined. No internal working of the software is defined in this model. The
diagrams contained in this view are:
2) Structural view
In the structural view, only the structure of the model is explained. This gives an
estimate of what the software consists of. However, internal working is still not
defined in this model. The diagram that this view includes are:
Class Diagrams
Object Diagrams
3) Behavioral view
The behavioral view contains the diagrams which explain the behavior of the
software. These diagrams are:
Sequence Diagram
Collaboration Diagram
State chart Diagram
Activity Diagram
4) Environmental view
The environmental view contains the diagram which explains the after deployment
behavior of the software model. This diagram usually explains the user interactions
and software effects on the system. The diagrams that the environmental model
contain are:
Deployment diagram
5) Implementation view
The implementation view consists of the diagrams which represent the
implementation part of the software. This view is related to the developer’s views.
This is the only view in which the internal workflow of the software is defined. The
diagram that this view contains is as follows:
Features:
Lucidchart,
The Lucidchart is a tool where users draw diagrams and charts. It provides
a collaborative platform for drawing diagrams. It is an online tool and paid
service. People can use it with a single sign-up. It is user-friendly. It
contains all the shapes for drawing any UML diagrams. It also
provides basic templates for all diagrams. So we can draw any diagram
easily with the help of those templates. It also helps business people to
plan for their events. So it will be very helpful for data visualization,
diagramming, etc. It uses a free trial option. It allows only a few frames and
shapes for free trial users. Free users are allowed to use only 60 shapes
per diagram. It does not support enterprise browsers. This tool is not only
helpful for drawing UML diagrams but also helpful for any project
design and project management.
Gliffy.
Gliffy was founded by Chris Kohlhardt and Clint Dickson in 2005. Gliffy is
an online programming tool that allows any team to visually share ideas.
The main advantage of Gliffy is the drag and drop feature which makes
the drawing so easy. We can effortlessly drag and drop the shapes and use
the available templates. It eases the process of drawing diagrams. Using
this we can draw wireframes for apps, design projects. In Gliffy we can
draw the diagrams with ease, share the document with anyone we want,
and can collaborate instantly, import and export the documents easily.
Another advantage of Gliffy is that it is cloud-based and does not need to
require the users to download it. The allowed format of downloadable
extensions in Gliffy are PNG, JPG, SVG, etc. We can also choose the size
like fit to max size, screen size, medium, large, extra-large.
UNIT-IV
Software testing is a process of identifying the correctness of software by considering its all
attributes (Reliability, Scalability, Portability, Re-usability, Usability) and evaluating the
execution of software components to find the software bugs or errors or defects.
Functional Testing:
It tests what the product does. It describes how the product does.
Can be done by trial and error Data domains along with inner
14. ways and methods. or internal boundaries can be
To avoid the errors, we will execute Static testing in the initial stage of
development because it is easier to identify the sources of errors, and it can fix
easily.
In other words, we can say that Static testing can be done manually or with the
help of tools to improve the quality of the application by finding the error at the
early stage of development; that is also called the verification process.
Structural testing
Structural testing, also known as glass box testing or white box testing is an
approach where the tests are derived from the knowledge of the software's
structure or internal implementation.
The other names of structural testing includes clear box testing, open box testing,
logic driven testing or path driven testing.
Desk Checking,
Desk checking is the process of manually reviewing the source
code of a program. It involves reading through the functions within
the code and manually testing them, often with
multiple input values. Developers may desk check their code
before releasing a software program to make sure
the algorithms are functioning efficiently and correctly.
The term "desk checking" refers to the manual approach of
reviewing source code (sitting a desk), rather than running it
through a debugger or another automated process. In some
cases, a programmer may even use a pencil and paper to record
the process and output of functions within a program. For
example, the developer may track the value of one or
more variables in a function from beginning to end. Manually
going through the code line-by-line may help a programmer catch
improper logic or inefficiencies that a software debugger would
not.
Code Walk Through,
Code walkthroughs are a form of peer review. The author of the code
typically leads a meeting attended by other members of the team.
A few members of the team are usually given a copy of the code a couple
of days before the meeting. The author presents the document under
review while the attending members run test cases over the code by hand.
Team members may also ask the author any relevant questions.
All attending members share and discuss their own findings with the
author.
The purpose
Code walkthrough is an informal analysis technique that aims to identify
any defects within the code.
This also allows all members of the team to gain an understanding of the
code, and thus enables cooperation and collaboration between members.
Advantages
Incorporates multiple perspectives
Fosters communication between the team
Increases the knowledge of the entire team related to the code in
question
Disadvantages
Areas where questions are not raised may go unnoticed
Lack of diversity, as the author leads the meeting and everyone
merely verifies if what is being said matches the code
Meetings can be time-consuming
Beta Testing,
Beta testing is a type of User Acceptance Testing among the most crucial testing,
which performed before the release of the software. Beta Testing is a type of Field
Test. This testing performs at the end of the software testing life cycle. This type of
testing can be considered as external user acceptance testing. It is a type of salient
testing. Real users perform this testing. This testing executed after the alpha
testing. In this the new version, beta testing is released to a limited audience to
check the accessibility, usability, and functionality, and more.
o Beta testing is the last phase of the testing, which is carried out at the
client's or customer's site.
Stress Testing,
Code Inspection,
Code Coverage,
Code coverage is a measure used in software testing. It describes the degree to which the
source code of a program has been tested. It is a form of testing that inspects the code directly
and is therefore a form of white box testing.[1] In time, the use of code coverage has been
extended to the field of digital hardware, the contemporary design methodology of which relies
on hardware description languages (HDLs). Code coverage was among the first methods
invented for systematic software testing.
Function coverage - Has each function (or subroutine) in the program been called?
Statement coverage - Has each node in the program been executed?
Decision coverage (not the same as branch coverage - see Position Paper CAST10.) -
Has every edge in the program been executed? For instance, have the requirements of
each branch of each control structure (such as in IF and CASE statements) been met as
well as not met?
Condition coverage (or predicate coverage) - Has each boolean sub-expression
evaluated both to true and false? This does not necessarily imply decision coverage.
Condition/decision coverage - Both decision and condition coverage should be satisfied.
Code Complexity,
The complexity of a given piece of code has to do with just how complicated and
unwieldy it is for a developer to understand. This idea makes intuitive sense. For
example, the picture at the top of the article is way more complex than, say, a
picture of a single rose on a white background.
In particular, the codebase's size can make it difficult for anyone to wrap their
heads around exactly what's going on. This becomes even more of a problem
when the code begins to have multiple paths through conditionals, has several
dependencies, or is coupled with other parts of the codebase.
a)
def squared(x):
x2 = x * x
return x2
b)
def squared_conditional(lst):
result = []
for x in lst:
if x > 3:
x2 = x * x
else:
x2 = x * x * x
result.append(x2)
return result
Just by looking at the two functions in a) and b), you can easily see that b) is
more complex because there's a lot more going on. In the second example, there
are far more lines, there's a for loop, and there's an if-else statement that makes it
more complex.
Statement Coverage,
Statement coverage is one of the widely used software testing. It comes under
white box testing.
Statement coverage technique is used to design white box test cases. This
technique involves execution of all statements of the source code at least once. It is
used to calculate the total number of executed statements in the source code out
of total statements present in the source code.
Statement coverage derives scenario of test cases under the white box testing
process which is based upon the structure of the code.
In white box testing, concentration of the tester is on the working of internal source
code and flow chart or flow graph of the code.
Path Testing
Path Testing is a structural testing method based on the source code or algorithm
and NOT based on the specifications. It can be applied at different levels of
granularity.
Condition Testing
Condition coverage is also known as Predicate Coverage in which each one of the
Boolean expression have been evaluated to both TRUE and FALSE.
Example
if ((A || B) && C)
{
<< Few Statements >>
}
else
{
<< Few Statements >>
}
Function Coverage,
Cyclomatic Complexity,
Compatibility,
The application could also impact due to different versions, resolution, internet speed
and configuration, etc. Hence it’s important to test the application in all possible
manners to reduce failures and overcome embarrassments of bug leakage. As a Non-
functional test, Compatibility testing is to endorse that the application runs properly in
different browsers, versions, OS, and networks successfully.
Network
It is to check the application in a different network like 3G, WIFI, etc.
Mobile Devices
It is to check if the application is compatible with mobile devices and their platforms
like android, iOS, windows, etc.
Operating Systems
It is to check if the application is compatible with different Operating Systems like
Windows, Linux, Mac, etc.
Versions
It is important to test software applications in different versions of the software. There
are two different types of version inspection.
Integration testing is the second level of the software testing process comes after
unit testing. In this testing, units or individual components of the software are
tested in a group. The focus of the integration testing level is to expose defects at
the time of interaction between integrated components or units.
Unit testing uses modules for testing purpose, and these modules are combined
and tested in integration testing. The Software is developed with a number of
software modules that are coded by different coders or programmers. The goal of
integration testing is to check the correctness of communication among all the
modules.
Acceptability,
User acceptance testing (UAT) is a type of testing, which is done by the customer
before accepting the final product. Generally, UAT is done by the customer
(domain expert) for their satisfaction, and check whether the application is working
according to given business scenarios, real-time scenarios.
In this, we concentrate only on those features and scenarios which are regularly
used by the customer or mostly user scenarios for the business or those scenarios
which are used daily by the end-user or the customer.
Testing Tools
Selenium,
Ranorex has a good Record, Replay and Edit User Performed Actions with the
Object-Based Capture/Replay Editor, which means that the Ranorex Recorder
offers a simple approach to create automated test steps for web, mobile
(native and WAP) and desktop applications.
watir
Watir (Web Application Testing in Ruby), pronounced as "Water" is an open source tool
developed using Ruby which helps in automating web application no matter which
language the application is written. The browsers supported are Internet Explorer, Firefox,
Chrome, Safari, and Edge. Watir is available as Rubygems gem for installation.
Features of Watir
Disadvantages of Watir
Like any other software, Watir also has its limitations
Watir is supported only for Ruby test framework and it cannot be used with
any other testing frameworks.
Mobile testing using Watir is not enhanced and desktop browsers are
mimicked to behave like mobile browsers instead of acting as real time
devices.
UNIT-V
This model classifies all software requirements into 11 software quality factors. The
11 factors are grouped into three categories – product operation, product revision,
and product transition factors.
Product operation factors − Correctness, Reliability, Efficiency, Integrity,
Usability.
Product revision factors − Maintainability, Flexibility, Testability.
Product transition factors − Portability, Reusability, Interoperability.
Software Reliability,
Software reliability is also defined as the probability that a software system fulfills
its assigned task in a given environment for a predefined number of input cases,
assuming that the hardware and the input are free of error.
For example, large next-generation aircraft will have over 1 million source lines of
software on-board; next-generation air traffic control systems will contain between
one and two million lines; the upcoming International Space Station will have over
two million lines on-board and over 10 million lines of ground support software;
several significant life-critical defense systems will have over 5 million source lines
of software. While the complexity of software is inversely associated with software
reliability, it is directly related to other vital factors in software quality, especially
functionality, capability, etc.
The ISO/IEC 9126 standard describes a software quality model which categorizes software
quality into six characteristics (factors) which are sub-divided into sub-characteristics (criteria).
The characteristics are manifested externally when the software is used as a consequence of
internal software attributes.
The internal software attributes are measured by means of internal metrics (e.g., monitoring of
software development before delivery). Examples of internal metrics are given in ISO 9126-3.
The quality characteristics are measured externally by means of external metrics (e.g.,
evaluation of software products to be delivered). Examples of external metrics are given in ISO
9126-2.
Our work focuses on the assessment of the internal quality of a software product as it can be
assessed upon the source code. In the following we describe the general quality model as
defined in ISO 9126-1 with its properties and sub-properties. Details of the internal aspect of
this model are given as well.
9000 Model,
Shortcomings of SEI/CMM:
1. Corrective maintenance:
Corrective maintenance of a software product may be essential either to
rectify some bugs observed while the system is in use, or to enhance
the performance of the system.
2. Adaptive maintenance:
This includes modifications and updations when the customers need the
product to run on new platforms, on new operating systems, or when
they need the product to interface with new hardware and software.
3. Perfective maintenance:
A software product needs maintenance to support the new features that
the users want or to change different types of functionalities of the
system according to the customer demands.
4. Preventive maintenance:
This type of maintenance includes modifications and updations to
prevent future problems of the software. It goals to attend problems,
which are not significant at this moment but may cause serious issues in
future.
Cost Factors
The key factors that distinguish development and maintenance and which
lead to higher maintenance cost are divided into two subcategories:
1. Non-Technical factors
2. Technical factors
Non-Technical factors:
Technical factors:
1. module independence
2. Programming language
3. Programming style
4. Program validation and testing
5. Documentation
6. Configuration management techniques
1. Inventory Analysis
2. Document Reconstruction
3. Reverse Engineering
4. Code Reconstruction
5. Data Reconstruction
6. Forward Engineering
Diagrammatic Representation:
Reverse Engineering,
1. Collection Information:
From the information extracted in step-3 and step-4, set of data flow
diagrams are derived to show the flow of data among the processes.
6. Recording control flow:
8. Generate documentation:
Case Study
Case study in software engineering is an empirical enquiry that draws on multiple sources of
evidence to investigate one instance of a contemporary software engineering phenomenon within
its real life context cannot be clearly specified. Fenton and pfleeger identify four factors that affect
the choice between experiment and case study: level of control, difficulty of control, level of
replication, and cost of replication. Easterbrook et al. call case studies one of the five “classes of
research methods”. Zelkowitz and Wallace propose a terminology that is somewhat different from
what is used in other fields, and categorize project monitoring, case study, and field study as
observational methods. Alexander and Potters study of formal specifications and rapid
prototyping
Data Collection: In order to properly study software engineering the case study researcher must
consider a wide range of types of data collection that either gather the naturally produced data or
that generate new data. It is important to carefully decide which data to collect and how to collect
the data. It is advantageous to use several data sources, and several types of one single data source.
We have reviewed five main types of data collection: interviews: interviews focus groups,
observation, archival data and metrics.
Interviews: Data collection through interviews is one of the most frequently used and most
important sources of data in case studies in software engineering. Almost all case studies involve
some kind of interviews, either for primary data collection or as validation of other kinds of data.
An interview can be carried out in many different ways, but essentially a researcher talks to an
interviewee attempts to answer. Interview question may be open, that is, allowing and inviting a
broad range of answer and issues from the interviewee, or closed, offering a limited set of
alternative answers. Interviews may be divided into unstructured, structured, and fully structured.