SWE2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

POPULAR PUBUCATfQNS SOFTWARE ENGINEERING

Extends b) Sequence diagrams describe interactions among classes in terms of an exchange of


ln a~othe~ f~nn. of interaction, a given use case (the extension) messages over time. A sequence diagram is an interaction diagram. From the name it is _
relationship indicates that the behavior of the extension use c may exten~ another. Th·18 clear that the ~iagram deals with some sequences, which are the sequence of messages
extended use ca~e un?e~ some_ conditions. ase may be in~erted in t nowing from one object to another. Interaction among the components of a system is
An extend relat1onsh1p 1s depicted with a direct d . he very imp?rta~t from implementation and execution perspective. So Sequence diagram is
th: include rela~onship. The tip of the arrowhe:d ai:~;s having a dotted line, similar
~hild_ use case ,s_ con~ected at the base of the a~row ~oh thest parent use case and t~o used to visualize the sequence of calls in a system to perform a specific functionality.
1dent1fies the relat1onsh1p as an extend
~ relationsh. · . · ~in the
s r, own ereotype
figure. "<<extend>>"e . · I Uw
,
I I
off hook
Telecom I I User I
~
1'! <<extend>>
ring
Perform Palhological
Tests

Figure shows" an example of an extend relationship between the "


(parent) and Perform Pathological Tests" (ch'ld) Perform medical tests"
Tests" use case enhances the functionali ' us~ cases. The "Perform Patholo i
Essentially, the "Perform Pathological Te7ts,?f the Pe~form medical tests" use :~al
generic "Perform medical tests" use case. use case is a specialized version of th: I I

Slanted messages take some time can model , . . :


J'd Part: eas7 and i~tuitive way of describing the b h r~l-ttme systems. Sequence diagrams are an
<<module>> an interaction arranged in a time sequence~ av10_r ofa system. A sequence diagram shows
Hospital Reception

Telephone Call

B B S e:=J
1
, Offiiook
Exchange

:
Rccc1vcr
.

1
Talk

: DinlTonc

Receptionist : Di:1INumbcr
Outpatient Hospital
Admission
! RingTonc
<<include>>
Inpatient HospiLal Bed
Admission Allnrmenr
[n UML . .~-----.:~ OnHook :
, an activity d' ·
the sequence of a . ia~am provides a view f .
system. The flow ct1ons in a process. Activi o_ the behavior of a system
links. Acti . . can be sequential ty diagram describes th fl by describing
numbers v1t1~s are nothing but ' concurrent or• branched c . e. ow of control in a
used to vi~: atvities present to cap:e ~nctions of a system or;;~shng of activities and
USE CASE Diagram with "exte~ds" and "includes" a ize the flow of controls~~ t e entire flow in a sys~em :\~ay ~e multiple
. a system. This is prepa d. c tv1ty diagrams are
re to have an idea of h
SWE-SJ ow
SWE-52

Jt
POPULAR PUBLICATIONS
SOFTWARE ENGINEERING
the system will work when executed. Activity diagrams can be used for
purposes: the follow 1ng m and Level-1 DFD for Library management system.
) Draw th• context di agra
• To desc~be a business process o: a flow of work between users and the
• To descnbe the steps performed tn a use case. system. ~r:w aleo USE-CASE bdlabg:~::~;gt~; ;i~t;~~plain with a suitable exa[Wm~l~T 2014)
b) What do you mHn Y
• To describe a method, function or operation in software.
• Drawing an activity diagram can help you improve a process. Answer:
Activity diagrams can be ?evelop~~ in v_arious de~rees_ of detail. They can be refined a) l'' Part:
by step. In the external view, act1v1ty diagrams, Just hke use case diagra . step 0.0
.
represent business processes_ ~n d act1v1t1es
. .. ti:om the outside rns, exclus1ve1
perspective. Reft . Y
Library Demanded
diagrams d?es not mean descnbmg p~ocess ~etatls th~t are performed within the busi~~ng
Information book info
system, which often leads to an unnoticed shift to the mtemal view: ss System
Passmger Arr"es
at Check-In Accep11ng an Event (Action)

(Arrow Down)-Act1v1ty Edge DFD at level-0 Library Information System


Calhng an Acuvity Here inside O level data flow diagram, there will be one process called library
Passenger Chcck-lrl,
management system
Dec1s1on Node There are many entities that directly interact with this system
• For example Student can issue a book a book, pays fine, get library card, issue
book as well as request or return a book
[Check-In OK] Fork • Demanded book will be displayed inside this system.
Book sehcs
Book request

Student Library card


L1Stof
Authors
Passenger Boards
Book
Lmor
Jom Tnlcs

Info
Acuon
Topic
D1spla) of
Book request Bool
Act1 v1ty Final Node (By topic)
Demanded
Book
Book
(Based on topic) Info

DFD at level-I Library Information System


Fig: Activity diagram "Passenger Services" with a low level of detail ("High Level")

SWE-54 SWE-55
POPUµ\R PUBUCAJIQNS SOfTI"iARE ENGINEERING

2..i Part:
USE-CASE diagram for this system
,--------------,
<<module>>
Customers

Online Public Access Catalog

Ship Books

\IFlll \ fUlll!.!!!ll

Parron
i'Dli11rl!'1711
ITMTi11i1":lW11
r-----r-~,.._mmmnn,
lf~ilrnl
nLibrary Invoices
T 3
CollcctPa)m<nt
~
~L__J

Count Orders
b) When decomposing a DFD, you must conserve inputs to and outputs from a process at
the next level of decomposition.
The data that flow into or out of a bubble must match the data flow at the next level of 5. a) Explain when and why you will use PERT charts and when and why you will
DFD. This is known as balancing a DFD. use Gantt charts while you are a project manager.
Process decomposition organize overall DFD in a series of levels so that each level b) Consider a software project with 5 activities T1 to TS. Duration of 5 activities in
weeks are 3, 2, 3, 5, 2 respectively. T2 and T4 can start when T1 is complete. T3 can
provides successively more detail about a portion of the level above it. The goal of the
start when T2 is complete. TS can start when both T3 and T4 are complete. Draw
balancing feature is to check the system internal consistency. When a process_ is activity network for the project. When is the latest start date of the activity T3?
decomposed, it helps to initialize the sub diagram, the objects from the up~er-l~vel t_o link What is the float of the activity T4? Which activities are on the critical path? Draw
to the sub-process. The following example shows a top level DFD, which 1s going to the Gantt chart also. [WBUT 2014, 2019]
decompose the Collect Payment process: Answer:
a) One significant advantage of PERT charts is that all individual task.sand dependencies
are shown
I) PERT stands for Project Evaluation and review Technique
2) PERT network ~roduces pro~a_bilistic measures, where as Gantt only estimates.
3) A PERT chart displays the critical path for the overall project and the slack time
4) A Gantt chart ofTers a rapid overview
5) PERT and Gantt charts are not mutually exclusive techniques.

SWE-56 SWE-S7
POPULAR PUQLICA TIQNS

b)
---------- -- . I OFD
d) Distinguish between physical OFD and log1ca w
SQFTY{A RE ENG INEERING

ith example of each.


[WBUT 2015]

~o;:;:=ofthe advantages of using decision trees are:


1. Decision rules are clearly structured
EFT 2. Decisio n making is consistent . .
J Decision tree algorithms are intended for class1ficatron
LST LFT
4:Each branch of a decision tree corresponds to an outcome of the test and each
external node denotes a class prediction.
5. At each node, the algorithm chooses the ··best" attribute to partition the data into
LFT: Latest finish Time; LST: Latest Start T'
Start Time rme; EFT: Early Finish Ti me· individual classes.
Latest Start date ofTJ : 5 days ' EST: Early 6. Decision tree is a method of documentation that is easily prepared, changed a nd
Float at T4= LST-EST=J -3=0 days Updated.
7. Communication between the System Analyst and the coder/programmer is easy.
The two critical paths of the project are· In some cases decision tree is even advantageous over decision tables. Like; its
I. Start-TI-T2-T3-T5 = JO Days . construction is simple; diagrammatic presentations are clear and simple to take actions.
2. Start-TI-T4-T5= 10 Days Another disadvantage of decision table is that they do not scale up well as they are prone
As _~~ the paths takes IO days, both are critical
actrvitres are considered to be critical. , so slack at any activity is zero and all to redundancies.

Gantt chart b) The two occasions where DT's should be exploited are:
I. When there are "complex conditions, actions, and rules.
2. ~~en there is many redundancies, and numerous contradictions within the process
Dec1s1on tables also have the ability to include every possible conditions. ·
10
Tl
c)
---1- 10% Interest

--- - -8%11 lnterc:sl

-- - 6% Interest
T4
I Dec1s1on Tree
I
TS I Decision Table:
I
CP _......,_ I _ __.!.,._.!..,_.....,L_l,__J__..J
_.__,:_ I
Condition Stub
I 2 3
a Account Balance > 5ooo y y
b A~count Balance < 5000
6 - a) C Tune> 3 vrs ~
b) Write down
Mention tw .thre~ a d vantages of decis ion trees over decis ion table. y
c) A bank has~ srt_u atrons where decision tables w ork best.
d Time <3 vrs y -
On deposit of ;crded to adopt the following policy o n deposits :
Action Stub -
._II_ Interest ca) I 0%
10%. On the sa s. S,000/- _and above and fo r t hree years or above the interest is X
l!___ ,Interest cal8%
below Rs . ;e _deposit .for a period less than 3 years it is 8%. On deposits X
d ..
Develop a 5 000 e interest rs 6 ¼ regardless of the period of deposit.
O .£.....Jnterest ca)6%
X
the above ~~rsron _tree and a decision table for the above process. Also express
po rcy using structured English.
SWE-59
SWE-58
POPULAR PUBLICATIONS
SOFTWARE ENGINEERING
d) Physical data flow diagrams show how the system
will be imple_mented. . operates or how the ne\li syste _ . d which again is sent to
. criteria a financial aid award lett_er is prepar:o• that the proper bill can
• Physical data flow diagrams include
Clarifying which processes are manual and which
Describing processes in greater detail are automated
rn
:i::~:r::~r
11 be sent to the student once
1
Also, the controller's office::,:~ ;~::i:t:r:: for classes. The ~ssocia~e
. ut the students recor •
event~~e~ updates the pending application file, closing o~ how many applications
Sequencing processes in the order they must be executed ::~~ month, the graduate school pre_pare~ \~~m/:1;~ is sent to the university's
Temporary data stores and transaction files have been received, approved and reiecte · is [WBUT 2015]
Specifying actual document and file names president.
Controls to ensure accuracy and completeness
Answer: . · · d approval process
Describ~s processes for adding, reading, changing, and deletin rec The following describes the app 1icauon an I F th universities the graduate
CRUD 1s an acronym for Create, Read, Update, Delete
A CRUD matrix shows which programs or processes add
master file records.
g
d
0rd s

' rea ' update, or delete


Students send applications tq the graduate schoo . rom ? er .
school receives transcripts. Additionally, unrelate~ ~htrd Jame~\
recommendation. The Graduate Management_ Adm1ss1ons ounci
rrovide letters of
GMAC) provides

GMAT scores.
Upon receipt of the above items, the ~aduate ~ch~ol prepares an app 1ca on
r ti packet and.
Logical ~ata flow diagrams show how the business operates. It shows the rocess enters the student's name in the pending appltcatton file. An acknowledgment letter 1s
~ould exist regardless of the type of system implemented P es that
sent to the student. _ _ .
• The progression of creating data flow diagrams is The Graduate school sends the application packet to the adrmss1ons committee. The
Create a logical DFD of the current system admissions committee reviews the student's credentials. In most cases, students are
Next ad_d all the data and processes not in the current system which must be accepted.
present m the new system The committee sends the applicant a letter explaining the result of the review. A copy of
Finally derive the physical data flow diagram for the new system the letter is also sent to the registrar who creates a student record in the registrar's system.
Advantages of logical DFDs are The accepted student's file s is sent to the associate dean for financial aid review. The
Better communication with users associate dean keeps a li st of available scholarships. Based on his review of the student's
More stable systems, since the design is based on a business framework interests and the scholarship criteria a financial aid award letter is prepared, which again
Increased understanding of the business by analysts is sent to the student. Also, the controller's office receives a copy so the proper bill can
The system will have increased flexibility and be easier to maintain eventually be sent to the student once he / she registers for classes.
Elimination of redundancy The associate dean then updates the pending application file, closing out the student
record.
7. Draw a context diagram and top level DFD for the following system. Also provide Eac~ month, the graduate school prepares a summary of how many applications were
relevant data dictionary. received, approved, an_d rejected. They send this report to the university's president.
The admission committee determines whether or not a student is admitted to
graduate school. The associated dean determines the financial aid.
Students send applications to the graduate school. From other universities, the
graduate school receives transcripts. Additionally, unrelated third parties provide
letter of recommendation. The Graduate Management Admissions Council (GMAC)
provides GMAT scores. Upon receipt of the above items, the graduate sch~ol
prepares an application packet and enters the student's name in the pending
application file. An acknowledgement letter is sent to the student. The gr~du~te
school sends the application packet to the admission committee. The adm~ssion
committee reviews the student's credentials. In most cases the students ar~
accepted The committee sends the applicant a letter explaining the result \
review. A copy of the letter is also sent to the registrar who creates a st ud~;
record in the registrar's system. The accepted student's file is sent t~ t ;
11
associated dean for financial aid review. The associate dP.an keeps a ; the
available scholarships. Based on the review of -~t,e student's interests an

SWE-60 SWE-61
POPULAR PUBLICATIONS

GMAC
flow chart and a structure chart~BUT 2016)
9. a) What is
b) List the po
t:
ns
difference between a
of a simplified design process.
a com uter program relate to eac
h

Answer: rt is used to show how modul~s of p


""'~'"•·~' J. A s~~~~\:~ shows a single modul~ in detail m with modules whereas a flowchart
/ Uni,ers1t1cs f other.structure chart can represent an enure progra .
Tran~
2. A module in a program.
~a~;e:i~~~:~: chart, rectangles re ~~ed :~:t~e:tn;0
r- ::sd I whereas a flow chart JS a
~;~ifferent shapes to den~~e

~
pictorial represent~tion of an a iont connector, decision etc outlines are usua y
terminal, process, input/output, ow me,
Rccommcndat1ons
~e;he steps of the simplified engineering design process are to:
1 Define the Problem
Adm1ss1onj sident 2: Do Background Research
Letter Admtss 3_ Specify Requirements
Lene 4 Brainstorm Solutions
s: Choose the Best Solution
~ 6. Do Development Work
7. Build a Prototype
Context Diagram
8 Test and Redesign .
Engi~eers/Developers do not always folio"'. the engin~ering de~ign process steps 1n order,
8. Distinguish between object oriented design and function oriented design with one after another. It is very common to design something, test 1t, find a problem, and then
proper examples. [WBUT 2015] go back to an earlier step to make a modification or change :he design. This_ WaY_ of
Answer: working is called iteration, and it is likely that the process will produce the 1dent1cal
In O~D state of information is not shared in a centralized data but is distributed among output.
the obJects of the system. In an employee pay-roll system, the following can be global
data: 10. What is Cohesion? Explain the cohesion classification with respect to software
names of the employees, design. [WBUT 2018)
employee code numbers, Answer: Refer to Question No. 11 (b) f l s' Part/ of Long Answer Type Questions.
basic salaries, etc.
Whereas, in object oriented systems data is distributed among different employee objects 11. 'Consider Roxy Roll Centre, a restaurant near College Street, Kolkata, owned
of the system. Objects communicate by message passing. One object may discover the by Sourav. Some are convinced that its Egg-Chicken Rolls are the best in College
state of information of another object by interrogating it. Of course, somewhere or other Street. Many people, especially Presidency University students and faculties,
frequently eat at Roxy. The restaurant uses an information system that takes
the functions must be implemented the functions are usually associated with specific real-
~ustomer orders, sends the orders to the kitchen, monitors goods sold and
world entities (objects) directly access only part of the system state information. inventory and generates reports for management.
Function-oriented techniques group functions together if as a group, they constitute a ~~aw the context diagram and Level 1 DFD for the Roxy's food ordering system
higher level function. On the other hand, object-oriented techniques group functions Le:: d;~~;_Level 2 DFD that will show the decomposition of any one process fro~
together on the basis of the data they operate on. lo the function-oriented program the 1
[WBUT 2019]
system state is centralized several functions accessing these data are defined. In the
object oriented program, the state information is distributed among various objects. ~se
00D to design the classes then applies top-down function oriented techniques to design
the internal methods of classes. Though outwardly a system may appear to _have been
developed in an object oriented fashion, but inside each class there is a small hierarchy of
functions designed in a top-down manner.
SWE-62 SWE-63
POPULAR PUBUCAIIQNS ~rWARE ENGINEFRING

Ans"·er:
, - - - - - - , C'u.sromer order , , - - - - - - - . .
An~;.:~~cteristics or a good user interface: . ronounced "gooey" is a method of
C'u.sromer Rece1,e onJ
fon,arJ
(U'iilOm(r
Kuchen
1 graphical user interface or GUI, somellmhe;r pof direct manipulation of graphical
interacting with a ~ompu_t':r through a mctap
Dcl11cr orJcr images and widgets m addition to text: . ws and other gadgets. The precursor to
GUls display visual clements such as icons, w~~~ Research Institute i1h the development
ln,entory
G Uls was invented by researchers at the Stan . r the On-Line System. The
h . k ·pulated with a mouse 1or h t
and use of text-based yper 1m s mani d d d to graphics by researc ers a
Updutc concept of hyperlinks was further refined an e.xtcn e
Xerox PARC.
Examples of systems that support GUIs are:
repon ,,-------'-.. report
• Mac OS,
• Microsoll Windows,
• NEXTSTEP
• X Window System.

J11divid11al Elements of User Interfaces are:


• About box
Level-I DFD • Dialog box
• Icon
Cuslomer order Recei'e • Balloon help
customer order • Button
Customer order • Check box
• Combo box
Genmlle customer rorward order
rece1pl for order to kuchen
...___ _ _ _ ___, Food order b) Cohesion and Coupling:
Dd1,er
Cohesion: Most researchers and engineers agree that a good software design implies
Cus1omer order Customer order clean decomposition of the problem into modules, and the neat arrangement of these
modules in a hierarchy. The primary characteristics of neat module decomposition are
Generare goods Generate high cohesion and low coupling. Cohesion is a measure of functional strength of a
sold data ,nvenlOI) data module. A module having high cohesion and low coupling is, said to be functionally
Goods sold data ln\~ntory data
independent of other modules. By the term functional independence, we mean that a
cohesive module performs a single task or function. A functionally independent module
has minimal interaction with other modules.
Level-2 DFD: Receive and Transform Customer food Order
12. Write short notes on the following : Classification of Cohesion: The different classes of cohesion that a module may possess
a) Characteristics of a good user interface [WBUT 2013] are:
b) Cohnion and Coupling [WBUT 2013)
[WBUT 2014, 2019] • Coincidental cohesion
c) Decision Tree and Decision Table • Logical cohesion
d)DFD [WBUT 2016]
[WBUT 201n • Communications cohesion
e) Work Break down Structure & Utility of PERT Chart
• Functional cohesion

SWE-65
SWE-64
p-
POPULAR PUBLICATIONS
~
Coupling between two modules is a measure of th d . articular branch to
interaction between the two modules. A module havinge h';greeh 0 ~ interdependence . . sequence. The p b roade. The
. . the starting point of the dec1~1~nand the decision to e
is said to be functionally indepen~ent o~ other modules. r/twoc~o:~~n ~d low coupli~; the diagram and it is the conditions that ex.is
amounts of data, then . they ~~ highly interdependent. The de ee es inter~hange large e followed depen~s on tation of a decision tree: '
two m~dules depends on their interface complexity. The interfa: co':.
~ouph~g between
detennined by the number of types of parameters that are • t h P exi~ is basically
b . . a pictorial represen
folloWU1g IS
, .
~ . • Acn.on
Condition <.___;

<
the functions of the module. in ere anged while invoking Acuon 1

<
.. _..--iActi.on
Condouon Condition <---....:
Classification of Coupling: Even if there are no te hn'
quantitatively _estim~te the coupling_ between two modules, ilas~(~~:ti~~ precise!y and
types of coupling will help to quantitatively estimate the degree f

• Data coupling .
h
I' of t e different
modules, rive type~ of coupling can occur between any two modu~e~oup mg between two
Root

Condition < Condition

Condition
Fig: StrUcture of a decision Tree
: :, Actron

• Stamp coupling
• Control coupling'
Example: I · d't'ons· ·
• . Common coupling
• Content coupling
A bank will grant loans under the fo lowing c~n I I ank
t and has no outstanding
I. Loan wil l be granted to a customer bavmg a b accoun
loan: ank b amount is outstanding from
c) Decision Tree and Decision Table: 2. If a customer has an account with the b ut some I is
A decision table is a tabular representation of a logical procedure by means of a set of previous Joans, then loan wi ll be granted if special management approva
conditions and related actions in the fonn of a matrix of rows and columns. Decision obtained:
table is useful for specifying complex policies and decision-making rules. Decision table 3. Reject loan applications in all other cases.
is made up of four sections presented below:
The decision tree will look like:
Conditions I Decisions Results
a. Condition Stub
b. Action St~b No I Reject the application
c. Condition Entries
d. Action Entries No
Customer has Dues 2 . Sanction the loan
account at the
A Decision Table .(DT) is a visual means for showing how a rule/or set of rules applies to Bank 3. Sanction the loan
Management
repetitive situations. It is a tool of the programmer as well as that of the systems analyst. Yes a pproval
lt can be used to supplement the flowchart. It is a 2x2 matrix. Where quadr~t_(l,l)
Customer has 4. Reject the application
represents condition stub. Quadrant (2, I) represents actions stub. Quadrant ( 1,2~ indicates Dues No
condition entry and (2,2) represents action entry. T he physical layout of a decision table Management
approval
is as given be Iow:
Rule (R) fd ent ifi ers Fig: Decision Tree
Header (J-0 d)DFD:
Condition stub/Statements Condition Entrv
A data flow diagram (DFD) · . ·
Action Stub/statements Action Entrv information syste DFD is a graphical representation of the "flow" of data through an
Notes: (NB) (structured design~· s can also be used for the visualization of data processing
On a DFD, data items flow from a
Decision table is suitable for complex and large size data analysis. . uentially on internal data store or an external d n ~xtem'.3-1 dat_a source or an internal data store to an
ata sink, via an internal process.
A decision tree is a diagrammatic representation of conditions and act,~ns ~e~n the left of
priority basis that resembles branches on a tree. The root of the tree ,s se
SWE-67
SWE-66
POPULAR PUBLICATIO~
sorrn'.ARE ENGINEERING
A DFD provides no infonnaf
processes will operate in se ton about the timin
flowchart, which shows the quence or in parallel. /i/f processes, or a
determine what operat,· flo~ of control th.rough therefore quite d'fiibout Wne•~1 • The progression of creating data flow diagrams is
· ons will b an algo · h- t ere ~er • Create a logical DFD of the current system. s stem which must be
circumstances, but not what kind f e per_formed, in wh nt,un, allowing nt from a • Next add all the data and processes not in the current y
where the data will come from a~~ data will be input to an~t order, and U~dteader to
are shown on a DFD). go to, nor where th d o~tput from th er What present in the new system . stem
e ata wd I be st e system n • Finally derive the physical data flow diagram for the newsy
Ex1crnal ored (all of w'~· or ■ Advantages of logical DFDs are
Entity •llch ■ Better communication with users .
More stable systems, since the design is based on a business framework
■ Increased understanding of the business by analysts . .
■ The system will have increased flexibilit} and be easier to maintain
• Elimination of redundancy
Disadvantages of data flow diagram
OFD is likely to take many alterations before agreement with the user
Physical considerations are usually left out
It is difficult to understand because it ambiguous to the user who have little or no
knowledge.

e) Work Break down Structure & Utility of PERT Chart:


: Plannin g ProcH• ~

Proj ■ ct Charter

E,1cmnl
Phrsical data JlUn' Uld~I 111m, :,11uw 11u~.!'~'i':~:, :>lC 111
be implemented. Y uµcidlc:. ui 11 uw u1c w::w system will
Physical data flow diagrams include
Clari('?'i~g which processes are manual and v,hich are automated
Descnbmg processes in greater detail
Sequencing processes in the order the} must be executed
Temporary data stor~s and transaction files
Specifying actual document and file names
Controls to ensure accuracy and completeness

s
Describes processes for adding, reading, changing, and deleting records
CRUD is an acronym for Create, Read, Update, Delete
A CRUD matrix shows which programs or processes add, read, update, or delete WBS:
I. WBs . d L•••llng •
master file records. b ts a eliverable-oriented h' .
y the project tea rerarch1cal decom os· .
deliverables rn, to accomplish the project ~b- ll1~n of the work to be executed
Logical data Oow diagrams show how the business operates. It shows the processes thal .
~ectrves and create th e required
\\Ould exist regardless of the type of system implemented
SWE-69
SWE-68
PQPULAR PUBLlCATIONS
SOFTWARE ENGINEERING

2. WBS represents the work specified in the current approved project s


statement cope/charter
3. Components comprising the WBS assist the stakeholders in viewing the d r CODINC & DOCUMENTATION
of the project e iverabJes
PERT:
I. PERT stands for Program Evaluation and Review Technique
j Multiple Choice Type Questions J
2. A PERT chart is a project management tool used to schedule, organ· [WBUT 2013]
1. Alpha testing is done by b) tester
coordinate tasks within a project ize, and a) customer
c) developer d) none of these
3. PERTs become very complex very quickly, so the key to usage is to plan
manage small chunks of work and Answer: (a)
In conclusion it is presented as: [WBUT 2013]
WBS Charts aids the team to visualize the plan 2. Beta testing is done by
a) the developers pages b) blocks
• Reduces inconsistencies in the project plan d) frames
c) holes
• Reduces duplicated tasks Answer: (a)
Intuitive
• PERT Charts reinforce sequencing (bi-directional) 3. Testing the software is basically [WBUT 2013]
• Locates orphan tasks a) verification b) validation
c) both (a) and (b) d) none of these
Promotes fixing obvious missing predecessors and successors
Answer: (c)
• Identifies wrong owners & process groups
Opportunities to shorten timelines 4. Functional testing is known as [WBUT 2013]
a) structural testing b) behavior testing
13. Draw and explain the DFD for ATM transaction system . [MODEL QUESTION] c) registration testing d) none of these
Answer: Answer: (b)
(2)
ATM (I). 5. System test is performed by
(3) Server [WBUT 2013j
a) end users b) programmers
c) system analyst d) none of these
(4) Answer: (d)
ATM (6)
Transaction
0 00 _ _ _ _ ___, 6. Equivalence class partitioning is followed in
[WBUT 2013]
a) white box testing b) black box testing
(5) c) both (a) and (b) d) none of these
Answer: (c)
Context Level - DFD/0-level DFD for an
Money automated Tailoring machine 7. In Integration Testing approach • wher .
wllhdra"n integrated in a single step is known 'as - e a11 modules making up a system are
a) top-down Integration Testin . [WB~T 2014]
c) big-band Integration Testings ~)) b~ttom-up Integration Testing
()) Customer at the ATM key in the public and private key to access the system Answer: (b) mixed Integration Testing
(2) Against the server the private and the public key is checked
(3,4) Server authenticate/ reject the user S. Alpha-testing is done by
(5) Money Transaction perfonned a) the development team [WBUT 2014]
(6) Balance updated c) the customer himself b) a friendly set of customers
Answer: {a) d) none of these

SWE-70 SWE-71
POPULAR PUBLICATIONS
~
[WBUT 20171
. hich of the following manner?
9. MTTF is a measure of -
a) reliability b) maintainability lWeur 20141 dinQ and testing are done in w b) Top-clown
c) cost of effort d) testability 16- ~~ AdhOC d) Bottom-UP
Answer: (a) c) cross sectional [WBUT 2017]
Answer: (a) "f c cle cost of sottware .is
10. Data hiding can be achieved by [WBUT 201 4]
a) Data Encapsulation b) Data Overloading 17. The largest percentage of total h e y b) Codi_ng cost
c) Data Abstraction d) Polymorphism a) oesign cost d) Testing cost
Answer: (a) · c) Maintenance cost
· Answer: (a) . . [WBUT 2017] ·
11 . One way to improve readability in coding is to
a) avoid goto statements
[WBUT2015] 18 Main difference between program t:s tg
t· nd system testing is
a the interfaces between programs,
b) name variables and functions according to their use . a) System t_esting focu~~~n~i:id~=I l~;ograms
c) modularize the program ~r~~~~a:stt~:fi~;~~s~~re comprehensive t~an_ system testing
d) none of these c: Sysfem testing is tough and program testing is easy
Answer: (a) d) none of these
12. The type of failure that occurs for all input valu~s while invok' 3 . Answer: (a) [WBUT 2017]
the system is mg function of
19. Decision support systems are used to . .
a) transient failu~e b) permanent failure [WBUT 2015] . a) Evaluate and analyz~ the mission of organization
c) recoverable failure d) unrecoverable failure b) To perform accounting
Answer: (b) · c) Perform multiple activities simultaneously
d) none of these
[WBUT 2015, 2018]
13. Function point describes Answer: (a)
a) the SRS document
20. Software testing is the [WBUT 2018]
b) the test plans
a) process of demonstrating that errors are not present
c) the functional decomposition b) process of establishing confidence that a program does what it is
d) the size of a software product directly from its specification
supposed to do
Answer: (d) c) ~~:~~i~at~;n:xecuting a program to show that it is working as per
14. Efforts are measured in terms of [WBUT 2015] d) process of exec~ting a program with the intent of finding errors
a) Person-months Answer: (d)
b) Persons
c) Rupees !~~:':~~ing the correspondence between the design component and the SRS is
d) Months [WBUT 2018]
a) availability
Answer: (a) 15 c) maintainability b) traceability
15. The cyclomatic complexity of the following program fragment is: [WBUT 20 l Answer: (b) d) reliability

int gcd (int x, int y)


while (xi = y) 22. System . .
Testing is performed b y a f nendly set of customer is known as
a) alpha testing
st
if (x > y) then c) performance testing b) beta !~ ing [WBUT 2018]
X = x-y; Answer: (b) d) usability testing
else y = y-x;
}
return x;
d) 5
} c) 4
a) 2 b) 3 SWE-73
Answer: (b)
SWE-72
POPULAR PUBUCATlONS SQf'TIYARE ENGINEERING

23. The potential risks are best detected by


a) spiral model . . erators that appear in a prograrn-
b) waterfall model CWBUT 20
c) incremental model 181 n 1- The number of ~1s~mct o~rands that appear in a program.
Answer: (a) d) prototyping model n2- The number of d1sttnct o!ator occurrences.
NI - The total number of op rand occurrences.
24. The most desirable form of cohesion is N 2- The total number of ope . for the overal I progr~m
a) sequential cohesion b) procedural cohesion [WBUT 201 8] . . ·ve measures to develop express10ns volume (number of bits
c) coincidental cohesion
d) functional cohesion
Halstead uses_ thes~ ~nm1t1 volume for an algorithm. the actu~l oftv.:are complexity). the
Answer: (d) len~h, potentta\;:;:;am), the program level (a ;e~ur~e:t~res such as development
required tf sp~(la constant for a given language) an bOl e; faults in the software.
25. The best type of coupling is langua~:v::pment time and even the P:ojected mun er o
a) coincidental b) logical [WBUT 2018] effort, h that length N can be estimated
c) informational
d) functional Halstead s ows ... (I)
Answer: (d) N= n I logi n I + n2 logi n2
and program volume may be defined (2) . .
26. Big Bang Integration testing is useful for project with [WBUT 20 V=N logi(nl+n2) . 1 e and r~~resents the volume of information (m
181 V will vary with programming anguag
a) smaller number of modules b) large number of modules
c) average number of modules d) none of these bits) required to sp_e~ify a program. exist for a particular algorithm. Haistead defines
Answer: (d) Theoretically, a minimum v_olu~e ~ust G the most compact fonn of a program to the
a volume ratio L as the ratio o I voum\"'
volume of the actual program. n actua '•J ,
L must always be less than 1. In terms of
27. In software metrics which metrics evaluate the track budget, schedule and
primitive measures, the volume ratio may be expressed as
human resource? [WBUT 2019]
a) Requirement metrics b) Product metrics L= 2/n I x n l/N2 . - an d I
c) Process metrics d) None of these Halstead ' s work is amenable to experiment venficauon arge b o d ) • of research has
Answer: (c) been conducted to investigate software science.

28. Alpha and Beta testing are forms of 2 What is Mutation Testing? [WBUT 2014]
[WBUT 2019] Distinguish between White-box Testing and Black-box testing? [WBUT 2014]
a) Acceptance testing b) Integrating testing
c) System testing OR,
d) Unit testing What is the difference between black-box and white-box testings?
Answer: (a) [WBUT 2016]
OR,
What are White box and black box testing? [WBUT 2019]
Short Answer Type Questions Answer:
111 Part:
1. What are Halstead 's metrics? [WBUT 2013] A mutant (or mutation) is a computer program that has been purpose!) altered from its
Answer: original version Mutation Testing is done on the application where bugs are purpose!)
Halstead's theory of software science is one of the best known and most thorough!) added to it. Mutation Testi11g is NOT a testing strateg) like path or data-jlo¼ testing. It
studied composite measures of (software) complexity. Software science proposed the first does not outline test data selection critena. lt should be used in conjuncuon with
analytical laws for computer software. traditional test!ng techniques, not instead of them For example. one mutation operator
ch~nges one binary operator (e.g. &&) to another (e.g. II) in an anempt to create a fault
vanant of the program.
Software science assigns quantitative laws to the development of computer so~~ar~
using a set of primitive measures that may be derived after code is generated or est imate A test case is ad~quate. if i_t is useful in detecting faults in a program. The major
once design is complete these follow. drawbac~ of mutation testing cs the cost of generating the mutants and executing each test
case against them.

SWE-74 SWE-75
r POPULAR PUBLICATIONS

2 nd Part:
While black box and white box testing are called by different names, they b .
involve looking at the strucl~re of the cod~ (while box~ or looking al the function:;~aliy
the code (black box). There 1s some question as to which approach is the most eff, Y_ of
or <:fficient. There is also an argument as to how much should be involved in whit:c~1:;
4. What_are

Test1n? is
different levels of T
.
esting and the ir goals?

Due to this, different e


as coding stages..
.
- [WBUT 2015)

nd design stages
as well
ed during specification ~ the testing process ..
Ans~er: used to detect faults_ ,ntrodut vels of testing are used i;he basic level of testing
·ms to test different aspec
ts of the system.
testing? Each leveloftest1nga1 ~
White bo~ testing_tends to involve covera?e, while b!acJ..._ box testing tends to involve is:
functional1t) . An inherent weakness of white bo.\ testing 1s that we tend to find err • Unit Testing
when the functi~n is partly wro~g, bu_t if it is a ~~rong function programmed correct!/:: • Integration Testing
is almost impossible to detect with i\h1te box testing. • System Testing .
• Acceptance Tesll ng
J. Distinguish between software verification and software validation . When durin
the life cycle verification and validation performed? (WBUT 201
4
f Fig: LeHIS of Testing .
OR,
What are software validation and verification?
Answer:
(WBUT 201
91
T sting starts at unit testing, then all the units
e s are erformed. Next System Tests are pe
;::~:~grand
. ated and testing like 81g Bang
finally acceptance tests are

1" Part: iestf, f


before implementation of the system.
Like testing, verification is a/so intended to find errors. Executing a program in a per orme . two is detected by testing?
simulated environment performs it. Validation refers to the process of using software in a 5. Distinguish between error and failure . Which of the [WBUT 2017]
live environment to find errors. When commercial systems are developed with the main Justify your answer.
aim of distributing them to dealers for sale purposes, they first go through verification, Answer: f • program with the intent
to Myers (1979) testing is the process o ana 1)Ztng a
sometimes called alpha testing. The feedback from the validation phase generally brings
some changes in the software to deal with errors and failures that are uncovered. Then a
:t~~~i;g
d' t d
errors. The terrn error is used to refer to the discrepanC) bet\\een co~~u e ·
observe/ or measured value ar>d the true or specified value. In other w~rds, it 1~ ~he
set of user sites is selected for putting the system into use on a live basis. These beta test differenc~ bet\-veen the actual output of software and corr~ct output Fault IS a condttton
sites use the system in day-to-day activities; they process live transactions and produce
that causes a system to fail in performing its required funcnon.
norrnal system output. Validation may continue for several months. During the course of
validating the system, failure may occur and the software will be changed. Continued use
Failure: Failure is the inability of a system to perform a required function according to
may bring more failures and the need for still more changes. its specifications. A software failure occurs if the behavior of the software is different
from the specified behavior.
2 nd Part: In software development, errors can be cropped up at an) stage during development.
Like testing, verification is also intended to find errors. Executing _a program i~ a
However, no method is perfect, and it is expected that some errors of the earlier phases
simulated environment performs it. Validation refers to the process of using s_oftware in_a
may finally reaches to the coding phase. This is because most of the verification methods
/ive environment to find errors. When commercial systems are developed with _the ~a1n
of earlier phases are manual. Hence the code developed during coding activity is lil-.ely to
aim of distributing them to dealers for sale purposes, they first go through venlica~1on,
have some requirement errors and design errors, in addition to errors introduced
sometimes called alpha testing. The feedback from the validation phase generally brings during the coding activity.
some changes in the software to deal with errors and failures that are uncovered. Then 8
During testing, the program to b~ tested is e'\ecuted with a set of test cases and the output
set of user sites is selected for putting the system into use on a live basis. These beta teS t
of the program for_ t~e _rest cases ,s evaluated to detcnnine if the program is perfonning as
sites use the system in day-to-day activities; they process live transactions and Prod uce
expect~d. From this 1t 1s clear that testing is used to lind out errors. Also, the success of
;~e ~;~~? proce~s clearly depend~ upon the test c~es used . Testing is a complex process.
normal system output. Validation may continue for several months. During the _course of
validating the system, failure may occur and the software will be changed. Continued use
a r ·r t~ make t~e process simpler, the testing activities are broken into smaller
may bring more failures and the need for still mere changes.
i:c~:~=~~I ~=st\~ th1~0:~; a ~roject, inc~emental t_esting is generally perfonned. In
subsystems are tes7eJ sepa:~t:lye b:~~~:~ :s br~l-.en htnto set of subsystems and these
testing. tn egrattng t em to fonn the system for syste m

SWE-76 SWE-77
p
POPULAR PUBLICATIONS ~
[WBUT 2018]
Phase Containment of Errors: The phase containment of erro ·
faults. Fault is identified during the review phase Defect is a 7 •~~ process of finding
prior phases but escaped from the previous inspections and/or re:u t in;od~ced frorn the 8. What are
. · n of sottware?
the metrics for esumat10 . are quantifiable or
e characteristics which I ding measuring
execution; . fault m~y be found at a _later stage of the project caus~~•~:-lati~:~g t~e Project ,i\oswer: tric is a measure of_ softwar t for many reasons,_ ,_nc u d many other
of correction. It 1s a best pr~ctlc~ to promote an environment wher/ t~•gher <:ost Soflw~~e m;oftware metrics_ are ,mp~::s, measuring product1v1ty, an
development team attempts to identify fault as early as possible and fix it e proJect ~i~:re ~erformance, planning work "fi d into three categories: produ:t
Factors ?f the total number of errors and the total number of faults found fro prornptly. uses. . . of software can be class, ie d metrics describe l e
product ,_s closer to the value of I 00%, the more effective of the inspection a dim a w_ork
on a particular work product. n or review
The metrics for esu:::::~~;s
and project metri~- Pr~ ~c;eatures performance, and
metrics, . ~rocetthe produ;t such as size, complex!tY, des1g software, development and
charactensucs o t . can be used to improve
6. "Spiral model is not a panacea'; explain the meaning of the stat quality level. Process me ncs
why spiral is called a Meta-model. eme[Wnt. Also state maintenance.
OR BUT 2018] [WBUT 2018]
9. State characteristics of feature point metrics.
Explain why the spiral life cycle model is c~nsidered to be a meta model.

Answer: [WBUT 2019)


Answer: . ,._, 2('J'd Partl of Long Answer Type Questions.
Refer to Quest10n , ,o. /
The En_glish _dicti~nary says the word panacea as the solution of everything. The spiral . the differences among fault,
10. What is formal technical review (FTR)? What are [WBUT 2019]
model 1s a ns~-dnven _software d~velopment process model. Based on the unique risk
failure and error?
patterns of a given proJect, th~ spiral model guides a team to adopt elements of one or
more pr~c~ss models, such as mcre~ental, waterfall, or evolutionary prototyping. When,
we say 1t 1s not a panacea means It can't produce solutions for any type of software ;::::rTecbnical Review (FTR) is a sofhvare quality control activit) performed by
development. software engineers.
~piraJ model is called Meta moue! because it comprehends all other life cycle models. Jt
1s called so also because of the way it comprises of other models of SDLC. E.g. both Objectives of formal technical review (FTR):
waterfall and prototype models are used in it. Some of these are:
Useful to uncover error m logic, function and implementation for an) representation of
7. What are the diffc:rent of information elicitation? [WBUT 2018] the software.
Answer: The purpose of FTR is to verify that the software meets specified requirements .
Requirements elicitation is perhaps the most difficult, most error-prone and most To ensure that software is represented according to predefined standards. It helps to
communication intensive software development. It can be successful only through an review the uniformity in software that is development in a um fonn manner. To makes the
effective customer-developer partnership. It is needed to know what the users really need. project more manageable. In additon, the purpose of FTR is to enable Junior engineer to
There are a number ofrequirements elicitation methods. A few of them are listed below - observer the analysis, design, coding and testing approach more close I). FTR also \.\'Orh.s
I. £nterviews ~:i;~:o~:~::~v~~/nd continuity become familiar\\ ith parts of softv,a:-e the) might not
2. Brainstorming Sessions
3. Facilitated Application Specification Technique (FAST) Fault: It is a condition that causes the software to fail to perform its required fi t"
4. Quality Function Deployment (QFD) !.r;or: Refe~s to dif!erence between Actual Output and E:-.pected output unc ion.
a1 ure: It is the mab,hcy of a system o . .
5. Use Case Approach according to its specification. r component to perform required function
The success ofan elicitation technique used depends on the maturity of the analyst,
developers, users and the customer involved.

SWE-78 SWE-79
~fTWARE ENGINEERING
POPULAR PUBLICATIONS

lze either it may be small or large. But


11. What are the differences between Alpha Testing and Beta Testing? of codes or piece of codes.
We can use black testing strate~ almost any s II
[MODEL QUESTION] 2) white box testing will be effective only for sma n~~~e application. But in Black box
Answer: 3) ln white box testing we cannot test Performance o
Alpha testing: Simulated or actual operational testing by potential users/customers 0
independent test team at the developers' site 1 but outside the development organizatio ran testing we can do it. . . ft t cases for white box. But in black
4) In general we have to write large quanuty o es
Beta testing: Operational testing b) potential and/or existing users/customers a~· box its a selection of sample test cases.
external site not othern ise involved with the developers, to detenninc whether or not"
h? L'18 t the important types of errors
component or s~stern satisfies the user/customer needs & lits within the busin a 14 _ What is meant by code walk-throug [MODEL QUESTION)
processes. Beta testing is often employed as a fom1 of external acceptance testing fore~~0
checked during code walk-through.
the shelfsoft\,are in order to acquire feedbad. from the mar_ket. Answer: . h code is traced by a group
Code Walk-through: A formal testing techmque w ere source . d
12. What is acceptance testing? Compare Top-down and Bottom-up integration with a small set of test cases while the state of program variables is manually mom tore
testings. [MODEL QUESTION] to analyze the programmer's logic and assumptions
Ans~·er: I. Flaws or potential flaws
Acceptance testing is black-box testing performed on a system (for example: a piece of 2. Consistency with the overall program design
software, lots of manufactured mechanical parts, or batches of chemical products) prior 10 3. The quality of comments
its delivery. It .is also known as functional testing, black-box testing, QA testing, 4. Adherence to coding standards.
application t~ting, confidence testing, final testing, validation testing, or factory S. Existence, for the functionality implemented.
acceptance tesnng. 6. Clarity and Readability
Software developers often distinguish acceptance testing by the system provider from 7. Completeness - e.g., User, Training, Reference, Table of Contents.
acceptance testing by the customer (the user or client) prior to accepting transfer of [MODEL QUESTION)
15. What is big bang approach of integration testing?
ownership. ln the case of software, acceptance testing performed by the customer is
Answer:
known as user acceptance testing (UAT), end-user testing, site (acceptance) testing, or In big bang Integration testing, individual modules of the programs are not integrated
field (acceptance) testing. until everything is ready.
Top down Approach: It is nothing but, checking the communication between the Main This approach is seen mostly in inexperienced programmers who rely on 'Run it and see'
Module to the Sub module. approach.
Example: ff A, 8 & Care three Module, Assume A is the main module and B, Care the
sub modules. Checking the communication from main module (A) to sub modules B & C 16. What is stress testing? Why is stress testing applicable to only certain type
are nothing but Top down approach. systems? [MODEL QUESTION]
Stub: In above example, assume that, if Sub module B is under construction. At that Answer:
time, the Developer take the help of a Temporary program (called as Stub) to check the Stress testing is_ a t7'?e of perfo~~n~e testing focused on detennining an application's
communication between the modules. rob~stn~ss, ~vatl~b1hty, _and_ rel_1ab1hty under extreme conditions. The goal of stress
Bottom Up: It is, checking the communication between the Sub Module to the Main testmg 1s to 1dent1fy apphcallon issues that arise o
module. condition~. These conditions can include heavy
Driver: In above example, assume that, if Main module A is under construction. At that c_o~putallona_l resources. Proper stress testing is
time, the Developer take the help of a Temporary program (called as Driver) lo check th e llmmg bugs, mterlock problems, priority problem~
communication between the modules. stress _a system to the breaking point in order t<
potentially harmful. The system is not expected to
13. What is the difference between black-box testing and white-box testing? NJ resources, but to behave (e.g., fail) in an acceptabl
[MODEL QUESTIO data).
Answer: . Str~ss tests typically involve simulating one or n
I) Generally black box testing will begin early in the software development i.~- ti~
0
vanety of stressful conditions. For example yo1
server that is already running a processo;-inte
requirement gathering phase it. But for white box testing approach one has to wait
the designing has to complete.
SWE-81
SWE-80
ff
POPULAR pueucATIQNS

applicatio~ is_ immediately "starved" of processor resources and must compete wi


zz.-
th the
odel is one of the m
~ARf

. .·
ost pnm1t1ve re
ENGTNfERI~

liability model. The


ressed in the form
other apphcatJon for processor cycles. You can also stress-test a single Web b) The Jelinski Mo~f;:~/:1he failur~ int~nsity ~anf~i7:~e is assumed to be same
a single item such as a stored procedure or class. page or even functional_represe~:(N-i+J ), where ume interva o
Thi~ chapter presents a high-level introduction to stress-testing a Web appli t" Rate of fad ure(t~;of errors present
testing can help you identify application issues that surface only u ~ion. st ress N ""'Total numb fi d at time intervals
conditions. n er extreme . ber of errors oun .
~~:S~~of observations for our case is:
E:umples or Stress Conditions N = 50 errors
Examples of stress conditions include: I = 30 fai lure
• Exc_essive volume in terms of either users or data; examples might · <D =_ 0.03 (~ve;i(50-30+l)=0.03x21 == .63 failure/cpu Hr.
1 Rate of fadure(t)=O.
denial of service (DoS) attack or a situation where a widely viewed inc u~e a
prompts a large number of users to visit a Web site during a three-minu~ews _,ten, After 40 f~ilur(es)=O 03(50-40+1 )=0.03xl I = .33 failure/c~u Hr
• Resource reduction such as a disk drive failure. e period. Rate of failure tfr. ·· 1 . decreasing with number offatlures
• Unexpected sequencing. Hence the rate o ,ai ures is
[WBUT 2014)
• Unexpected outages/outage recovery. 2. Explai n the LOC , Function point and Feature point.
O~ dt b ~us~d?
E:umples or Stress-Related Symptoms Why we use FP instead of LOC? Why do you think the FP nee o e a [WBUT 2017]
Examples of stress-related symptoms include:
• Data is lost or corrupted. Answer:
• Resource utilization remains unacceptably high after the stress is removed Linc of Code (LOC) . .
Application components fail to respond. · The most commonly used measure of source code program length JS the number of I mes
• Unhandled exceptions are presented to the end user of code (LOC) (Fenton, 1997). The abbreviation NCLOC is used to represent a non-
commented source line of code. NCLOC is also sometimes referred to as effective lines
Lone Anawer Type Queatlona of code (ELOC). NCLOC is therefore a measure of the uncommented length.
The commented length is also a valid measure, depending on whether or not line
1. •) What do you mean by aoftware rellablllty? (WBUT 2013, 2011]
documentation is considered to be a part of programming effon. The abbreviation CLOC
b) Briefly dNCribe one rellability model. (WBUT 2013) is used to represent a commented source line of code (Fenton, 1997).
Auwer:

. •) Reliability is:
The probability of failure-free software operation for a specified period of time in a
By measuring NCLOC and CLOC separately v.e can define:
total length (LOC) = NCLOC + CLOC

. specified environment KLOC is used to denote thousands ofl ines of code.

..
Probability of the product working "correctly" over a given period of time . Fun ction points
Informally denotes a product 's trustworthiness or dependability.
Funct!on points (FP) measure size in terms of the . . .
Software Reliability is an important attribute of software quality, together with Function points are computed by first calculatin amount ~f funct1onal!ty tn a system .
- functionality, (UFC). Counts are made for the foll . _g an unadJusted function point count
- usability, 1. _External inputs - those items pr~:;~;dc~tegones (Fenton, 199_7): .
- performance, ~n~nted data (such as file names and menu ~ the user that descnbe distinct application-
--:, --:, o ~ ~ , serviceability, o~ie::mal outputs - those items provideds;oe~h~ons).
~~ g ; ~ § ·~ - capabiJity,
! ·I~ i l ! -
..,,
=iinstallability,
- ~~intainabi_lity,
these) d data (such as reports and messages, rath:e;~a~;e~e~te_ distinct application-
3. External inq . . . e md1v1dual components of

umnrrbM
4 E UITtes - interactive in •.
s· 1 xternal files - machine-read bl ~uts requinng a response
. ntemal files - logical master~ I e t~terfaces to other systems
• es in the system
SWE-82 SWE-83

!:; 1!1t 1!1


-••A12J:'EN~
POPULAR PUBLICATIONS ~

Once ~his data has been collected, a complexity rating is associated with

(5.;J
according to Table I. each count
Wei11btin2 Factor
Item Simole Averae:e Comolex
External inputs 3 4 6
External outouts 4 5 7
External inquiries 3 4 6
External files
lnternal files
7
5
10
7
15
10 ~.
.
. the fibonacci senes. A
fibonacci sequence. is
. which looks ltke
Table 1: Function point complexity weights
M tly commonly used series ,s modified version of this gests mathematical
Each count is multiplied by its corresponding complexity weight and the re I~~ 5,8,13,21,34,45. Teams i~s~ec:use the original sequence sug
summed to provide the UFC. The adjusted function point count (FP) is calcu~u 1t~ are 1:2'.3'.5, I 3, 4 0, 10~- T~:c:~~nnot like that.
multiplying the UFC by a technical complexity factor (TCF). Components of the ;~F by accuracy and rea proJ
listed in Table 2 are 65
60
Fl Reliabl e back-up and recoverv F2 Data communications
55
F3 Distributed functions F4 Performance 50
F5 Heavily used configuration F6 Online data entrv 45
F7 Ooerational ease F8 Online uodate 40
35
F9 Comolex interface FIO Comolex oroccssin2 JO
Fl I Reusabi lity F12 Installation case 25
Fl3 Multiple sites Fl4 Facilitate chanl!e 20
Table 2: Components of the technical complexity factor 15
10

Each component is rated from 0 to 5, where 0 means the component has no influence on 0
the system and 5 means the component is essential. The TCF can then be calculated as: 0 10 11
TCF = 0.65 + 0.01 (SUM (Fi))
The factor varies from 0.65 (if each Fi is set to 0) to 1.35 (if each Fi is set to 5) (Fenton, It is a relative term and does not directly co relate to actual hours . Since story points have
1997). The final function point calculation is: no relevance to actual hours, it makes it easy to think abstract about the effort required to
FP=UFCx TCF complete a story.
If you look at the Fibonacci curve it really takes a steep climb. If using this series
Feature point . consider not using 1 and 2. Use 3, 5, 8, 13, 40, I 00 .
Story points are an estimate of how long it will take to develop a user story/proJect. Story But how do you know which story is a 3 and which is a five. In order to do that each team
points represent time. Time is our key to project execution, clients and customers ~are would have to find a baseline story. It does not have to be the smallest one but one that
about. They only care about complexity to the extent it influences the amount of ti_me all in_ the te~ can relate too. From then on all sizing should be done -co~pared to that
something will take. It is an estimate of the effort involved can be influenced by nsk, bru:el~ne. This also creates a lot of _confusion as story points do not relate to hours. So
uncertainty, and complexity. . let s Just not compare them. There ts another technique called ideal hours which can be
Story point is a arbitrary measure used to measure the effort required t~ 1mplemen\~ used.
story. In simple terms its a number that tells the team how hard the story 1s. Har~ cou Sto~ points c_reate lots of vagueness to your agile process. For every team story size
be related to complexity, Unknowns and effort. In most cases a story point range ,s 1• 2'
4,8,16 or X Small, Small, Medium, Large, Extra Large. 1
~:;:n~:a~~ : : ~ ~~~::~~e:Y
c?u mean different thing~ depending on what baseline they chose. IF tw~ teams are
0
c~eo~:1 say their velocity is 46 and the other can say 14.
So if you want to compare velocity b t ,
velocity is like comparing apples and eo:::t::eams that s a really bad id_ea as comparing
If you really have to track time then d 't g . So do ~10t compare velocity across teams.
on use story pomts at all
SWE-84 SWE-85 '
POPULAR PUBLICATIONS and that the program is only
. of only one program
3. a) What la meant by a Stub? What Is a Driver? that a system is made up
b) With some suitable examples, explain statement coverage branch Let us assume
and path coverage criteria. ' cover.i 9,, a single loop. Start l
c) Design a white box t - t suite for the following piece of C code:
int binary_search (int num)
Independent path
{ int min, max;
min =O;
max= 100;
::! ~ ~:: ;: !: !! 5, 6, 8, 3, 9)
Path 3 . (I, 2. 3. 4, 7, 8. 3. 9)
while (min! = max) { .
if (arr{(min + max)/2] > num)
max = (min + max)/2;
else if(arr[(mln + max)/2] < num)
min = (min + max)/2
}
return (-1 );
}
The suite should include Control Flow Graph, Independent Path and c 1 .
Complexity (using two different techniques). ' rwfiir 0
';' atic
015]
Answer:
a) J" Part:
A Stub is a dummy procedure, module or unit that stands in for an unfinished ponion of a Fig: An example of basis path
~~
c)
Four basic types of Stubs for Top-Down Testing are: I int binary search (int num)
I Display a trace message {int min, max; min= 0;max = 100;
2 Display parameter value(s) 2 while (min! = max) (
3 Return a value from a table 3 if(arrf(min + max)/2] > num) min= (min+ max)/2
4 Return table value selected by parameter 4 else it'(arr[(min + max)/2] < num) min= (min+ max)/2}
A stub is a computer program which is used as a substitute for the body of a software 5 return(-();
module that is or will be defined elsewhere or a dummy component or object used to 6 }

simulate the behavior of a real component until that component has been developed.
2° 4 Part: Control Flow Graph
Independent Paths are:
Driver is a the piece of code that passes test cases to another piece of code. Test Harness
or a test driver is supporting code and data used to provide an environment for testing a) 1-6 while (min!= max) { (false)
b) 1-2-3-5-6
part of a system in isolation. It can be called as a sofuvare module which is used to c) 1-2-4-5-6
invoke a module under test and provide test inputs, control and, monitor execution, and d) 1-2-3-5-1-6 (min!= max) [True)
report test results or most simplistically a Iine of code that calls a method and passes that e) 1- 2-4-5-1-6 (min!= max) [False]
method a value.
Cyclomatic Complexity
b) For Statement Coverage and Branch Coverage a) V(G) = E - N + 2 = 8 - 6 + 2 = 4
Refer lo Question No. 4(a) ofLong Answer Type Questions. b) V(G) = Total Number of bounded Areas+ I
=3+ 1 =4
·
Path Coverage c) V(G):: Total Number of decision points + I
Each independent path in the code is ta.ken in a predetermined order. Each statement in -3+ 1 =4
the software is executed at least once.

SWE-87
SWE-86
. . a ropriate input,
POPULAR PUBLICATIONS
. is tested by prov1d1ngei~d
ctionality of the systemual results with the exp .
results- This
client/ server
4 . a) Diacuu the limitations of testing . Why do we say that complete teatin
impossible? 9 11 Ea~h ~d t~:e~t;~ and comparing_ t~eerf:~:, APis, Database, s;cti:;t?:-;g can b7 _done
b) What are the various kinda of function testing? Describe any one in deta il.
c) Explain the boundary value analysis testing techn ique w ith the help of a"
veri_fy1nfnvolves checking ?f ustr h1n application under test.
tesung . and functionaltty o t e fu fonal testing we c ec
;;11 k the functionalities of
applicauons sing automation . In nc I
~:-;::~~- [WBUT 2016]
either manually~:: It mainly concentrates on-. of an application
a) Testing has a number of pitfalls that make it far less effective and efficient tha . the software sys . . T ting the main functions em It checks
should be. Testing is relatively ineffective in the sense that a significant number"
1
~
l. Main/in e fu_n_ct~~n ~: ~~es basic usability testing ofu_,~sy~tany difficulties.
2 Basic Usabdtty. t mvo . te through the screens wit ou
residual defects remain in a completed system when it is placed into operation. Testing~ . h user can freely nav1ga f h stem for the user
also relatively inefficient when you consider the large amount of effort, funding, and ti~s Whet er a_b 'J'ty· Checks the accessibility o . t e sy h ck for error conditions.
that is currently spent to find defects. Some of the significant testing limitations are teste: 3. Access, ' ' : . . of testing techniques to c e
below: 4. Error Cond1tw11\ ~~=!~or messages are displayed.
It checks whether su1 a
1. A program cannot be tested complerely
2. Testing can be perfonned against specific system requirements A comprehensive_list of functional testing are :
3. You cannot test every path a) Unit Testm~
4. You cannot test every val id input b) Smoke Tes~mg
5. You cannot test every invalid input c) Sanity Testmg .
6. Incomplete or ambiguous requirements may lead to inadequate or incorrect testing. d) Integration Te~ttng
7. Exhaustive (total) testing is impossible at any present scenario. e) White box testmg
8. Time and budget constraints nonnally require very careful planning of the testing f) Black Box testing .
effort. g) User Acceptance testing
9. In correct test results lead to make wrong business decisions. h) Regression Testing
JO. Even if you do find the last bug, you'll never know it is the end ofit.
1 I. You may run out of time before you run out oftest cases. Unit Testing is a level of software testing where individual units/ components of a
software are tested. The purpose is to validate that each unit of the softv,are performs as
We say complete testing is impossible because of the following reasons: designed. A unit is the smallest testable part of software. It usuall} has one or a few
• The realm of likely inputs of a program is often hefty to be fully used in testing a inputs and usually a single output. Unit Testing is the first level of testmg and is
system. There are both valid inputs and invalid inputs. The program may have a large performed prior to Integration Testing. It is performed by software developers
number of states. There may be timing wnstraints on the inputs, that is, an input may themselves or their peers. In rare cases it may also be performed by independent
be valid at a certain time and invalid at other times. An input value which is valid but software testers.
is not properly timed is called an inopportune input. The input domain of a system Some of the benefits of Unit Testing are :
can also be huge to be entirely used in testing a program. I. Unit te_sting incr7ases confidence in changing/ maintaining code. If good unit tests
The design issues may be too complex to completely test. The design may have are wntten and 1f they are r~n every time any code is changed, we will be able
included implicit design decisions and assumptions. For example, a programmer may to promptly catch any defects mtroduced due to the change.
use a global variable or a static variable to control program execution. 2. Codes are ~ore reusable. In order to make unit testing possible, codes need to be
It may not be possible to create all possible execution environments of the system. modular. This means that codes are easier to reuse.
This becomes more significant when the behaviour of the software system depends
on the real, outside world, such as weather, temperature, altitude, pressure, and so on.
3. TF~ c~st ofdfixing a defe~t detected during unit testing is lesser in comparison to that
o e ects etected at higher levels. Compare the ( · ·
humiliation) of a defect detected d _. cos~ time, effort, destruction,
live. u1 mg acceptance testing or when the software is
b) The techniques used for functional testing are often specification-based. Function~ 4. Debugging is easy. When a test fails I h I
Testing is the type of testing done against the business requirements of application. It 15 With testing at higher levels, chang;s o~:d: e atest changes need to be debugged.
a black box type of testi ng and it is not concerned about the source code of the months need to be scanned. over the span of several days/ weeks/
application.

SWE-88 SWE-89
eQPULAR PUBUCAJ!ONS SQ~ARE ENGINEERrNG

c-) Boundary value analysis is another black box test design technique and it ·
fin~ the errors at boundaries of input domain rather than finding those errors in~~ used to . b assing it information
of input. BVA is based on testing at the boundaries between partitions. e center Control coup.Im~ od I trolling the /low of another, y p
1rol coupling IS one m u econ
Her~ we have both valid boundaries (in the valid partitions) and invalid bound · . ~;~.,,hat to do (e.g., passing a what-to-do flag).
the invalid partitions_). Test cases are designed based on the both valid and~~Sn
boundary values. Typically, we choose one test case from each boundary. id oupling (Data-structured coupling) . d ta structure and use only parts
As an example, consider a printer that has an input option of the number of copies ~:::::: :oupling .occurs when modules s~are a ::1~0:~~or: to a function that only needs
mad~, fi-om I to 99. To apply boundary value analysis, we will take the minimumto be of it, possibly ddferent parts (e.g., passing a lead to
!n
maximum (boundary) values :rom ~e valid partiti~n (I .and 9~ this case) together :i~~ one field of it). . . . field that a module does not need may
the first or lasi value respectively m each of the invalid part1t1ons adjacent to the r In this situation, a modification in a I
partition (0 and 100 in this case). va id changing the way the module reads the record.
One test case for exact boundary values of input domains each means Land I 00.
One test case for just below boundary value of input dom~ins each means O and 99. Data coupling hr ugh for example, parameters. Each
One test case for just above boundary values of input domains each means 2 and IOI. Data coupling occurs wh~n modules share d~ta t Io dat~ shared (e.g., passing an integer
In this e~ple we would have three equivalence partitioning tests (one from each of the datum is an elementary piece, and these are t e on y
three parttt1ons) and four boundary value tests. to a function that computes a square root).

5 . Defi ne m od ule coupling and explain different types of coupling. [WBUT 201 6] ~~:s~sg~h~o::::~=s~ ~ ) of coupling. It can be a~hieved by state decentralizat_ion (as in
Answer:
objects) and component communi cation is done via parameters or message passing.
Modules are independent if they can function completely without the presence of the
other. Obviously, can't have modules completely independent of each other. Must interact
so that can produce desired outputs. The more connections between modules, the more No coupling
dependent they are in the sense that more info about one modules is required to Modules do not communicate at all with one another.
understand the other module. Coupling is the degree of interdependence between 6 What is reliability? Define ROCOF , POFOD, MTTF and MTTR. What is cyclomatic
software modules; a measure of how closely connected two routines or modules are; the c~mplexity? Write a c program to calculate GCD of two numbers and calculate the
strength of the relationships between modules. . . . cyclomatic complexity of your program . [WBUT 2019]
Coupling can be "low" or "high". Some types of coupling, in order of highest to lowest
Answer:
coupling, are as follows: The measure of reliability is defined as the probability of the software to operate without
failures under given conditions and at regular intervals. The ability to measure or predict
Content coupling (high) . . reliability in software engineering focuses on three general purposes. First, understanding
Content coupling occurs when one module modifies or relies on the. mt~ma! workings of and making trade-offs between reliability and other software characteristics, such as
another module (e.g., accessing local data of another module): I~ this s_ituat1on, a ch~nge performance, cost and schedule. Second, tracking progress when testing is comp lete.
in the way the second module produces data (location, type, timing) might also require a Third, determining the effect of using new methods to develop software.
change in the dependent module.
A common measure of how long a system can operate between failure of a critical part is
' mean time between failure (MTBF)', which is the average of times between
Common coupling . h dules share the successive failure. It is a statistical measure rather than a direct measure. A measure
Common coupling (also known as Global coupltn~) occurs w en two mo ·ght imply
same global data (e.g., a ~lob?I variable). Changing the shared resource m1 similar to MTBF is 'mea n time to repair (MTT R) ', which is the average amount of
time taken to repair a machine after a failure occurs. It can be combined with 'mean time
changing all the modules using 1t. to failure (MTIF)', which denotes how long a software can be used to calcu late MTBF.
That is:
External coupling hare an externally imposed data format, MTBF = MTIF + MTIR
Cxtemal coupling occurs when tw~ mo?ulesf. s This is basically related to the
communication protocol, or devrce . inter ace.
communication to external tools and devices.
SWE-91
SWE-90
POPULAR PUBLICATIONS

ROCOF (Rate of occurrenc,e of failure) is a measur~ o~ the frequency of occurrenc


failures. We can obtain the R OCOF measure by monitonng the behaviour of a 5 ft e of
product and calculating total number of failures over a specified period of time.
0
Ware
cMM standards
d) ,so v:-,e quality metrics
e) so~on point method
f) fun~~matric complexity
g) Cy~are Reengineering
- [WBUT
[WBUT
[WBUT
[WBUT
[WBUT
[WBUT
[WBUT
2014]
2014]
2015]
2016]
2016]
2017]
2018]
POFOD (Probability of failure on demand) is a measure of the probability of as ~) :i;ck box testin~ [WBUT 2019]
5t I
) ession Testing
failure after a service r e q u
issued.
est~is Y ern
j) Retgrgration & load testing
+Node k) In e
An;;::;~ent coverage v~. branch cov~rage:
-+Edge a) , "der following piece ofa code. .. boolean condition2, boolean


Lets co~si ml t(int input boolean cond1uonl,
ublic int retu npu ,
~onditionJ)
\nt x = input;
int Y = O;
CYCLOMATIC COMPLEXITY is a software meltric used to measure the complexity i f ( condi ti onl l
of a program. It is a quantitative measure of independent paths in the source code ofth x++;
program. Independent path is defined as a path that has at least one edge which has 00; if (condition2)
been traversed before in any other pa'ths. Cyclomatic complexity can be calculated with x--;
respect to functions, modules, methods or classes within a program. i f ( condi tion3)
This metric was developed by Thomas J. McCabe in I 976 and it is based on a control y=x;
return y;
flow represen'cation of the program. Control flow depicts a program as a graph which
}
consists of Nodes and Edges. Statement coverage
In the graph, Nodes represent processing tasks while edges represent control flow In order to execute every statement we need only one testcase which would set all
between the nodes. conditions to true, every Iine of a code (statement) is touched.
C program to calculate the GCD of two numbers : retumlnput(x, true, true, true)- 100% statement covered But only half of branches are
int gcd(int a, int b) covered and only one path.
{
1. while (a!=b)
Branch coverage
2. if (a>b)
3. a=a-b; You can visualize every "if-statement" as two branches (true-branch and false-branch).
4. else b=b-a; So it can clearly be seen that the above testcase follows only "true-branches" of every "1f
5. } statement". Only 50% of branches are covered.
6. ret;;urn a; In order to cover 100% of branches we would need to add following testcase:
retumJnput (x, false, false, false)
6 With these two testcases we have I 00% statements covered, I 00% branches covered
Cyclomatcic complexity ( C) can be calculated t'l\ .. ,, of the three methods:
1) C = E,dges -Nodes+2 = 7-6+2 =3 b) Verification and Validation:
2) C = N10. of regions= RI , R2, RJ = 3 Refer to Question No. 3 of Short Answer Type Questions.
3) C=P redicate nodes+! =2+1 =3
c) Six Sigma:
~~8~ 'busi:ss m~nagem~nt strategy that was initially developed by Motorola in the
7. Writ£, e;hort notes on the following:
a) Stat,em ent coverage vs. branch coverage fWBUT 2013)
and \~fy
I
now is used m m~ny fortune 500 companies. It is used primarily to identify
rec errors and defect m a manufacturing or business process. Six Sigma uses a
b) Veri ficHtion and Validation fWBUT 2013, 201 5)
c) Six Sigrna fWBUT 2014)
SWE-93
SWE-92
POPULAR PUBUCATIONS
related to
number of qualil) methods ~d tool~ th~t are us~d b) professionals within the II . t' concerns
ess areas for Ieve · ftware proJec s
organization, \\ho ha,e been trained on S1:-.. Sigma techniques. . There are no key procas at /eve/ 2 focus on the so mmarized below:
The Six Sigma DMAIC process (defines. measure, analyze, 1 improve, control) is The ~ey. pro;::i~ :~:ject management controls, as su
imprmement S)Stem for. e,isting processes falling below spec, fication and looking fiao establishing . ents Management (RM)
incremental improvement. The Si.\ Sigma DMADV process (define, measure, analyz~t I. Requirem ·eel Planning (PP)
design, \erify) is an improvement system used to de,elop new processes or products • 2 Software ProJ . d Oversight (PT).
. Software project Tracing an (SM)
Si.\ Sigma qualit) levels. It can also be _emp!oyed if a current process requires more thaat J. Software Subcontract Management
just incremental improvement. Both Six Sigma processes are executed by Six Si ~
Green Belts and Si.\ Sigma Black Belts, and are overseen by Six Sigma Master
Belts.
s:~ 45.. Software Quality As~uraMncaen(aQeAm)ent (CM)
6. Software Con tiigur
atton g
/ 3 address both project an
d organizational issues
as

The key process areas at /eve


d) ISO n. CMM standards: marized below: (PF)
sum I Organization Process Focus_ .
An international standard which provides broad guidance to software developers on h
to Implement, maintain and improve a quality software system capable of ensuring /~
2: Organization Process Definition (PD)
quality software consists of20 requirements. It differs from country to country. ig 3 Training Program (TP)
4. Integrated Software Management (rM)
Conunuously Level 5 s· Software Product Engineering (PE)
1mpro•;.,--~_op_1,_m_12_1ng_ _,
6: Inter group Coordination (IC)
7. Peer Reviews (PR) bl' h' g a quantitative understanding of
:~ :;:::e
Control Le,el 4 / Change
eas of /eve/ 4 focuses on esta ts 10
ge_d_
rnnauo~ .___M_a_na_ ___, management
~~~ ~rocess and the software work products as summarized below:
Dc,clop
/ Quan111a1"e I. Quantitative Process Control Management (QP)
common
process,,.,.---..___ _ _ ____,
management 2 Software Quality Management (QM) . .
The key process areas of /eve/ 5 cover the issues that both the organization and the
S1ab1l12e Le\CI 2 / Engineering projects as summarized below:
cnvironm~~-Re_pe_a_iab_lc_ _, management I. Defect Prevention (DP)
2. Technology Change Management (TM)
Level I / ProJecl J. Process Change Management (PC)
ln,110I managemenl

Fig: Relation between ISO and CMM c) Software quality metrics:


Software is a guide lo measuring software quality. It is a quantitative measure of a degree
I) ISO 9000 describes quality assurance elements in generic tenns that can be applied to to which a software system or process holds some property. The objective is to bring
any business. quantifiable measurements, which may have numerous valuable applications in sched ule
2) It treats an enterprise as a network of interconnected processes. and budget planning, cost estimation, quality assurance testing, software debugging,
3) To be ISO-complaint processes should adhere to the standards described. software performance optimization, and optimal personnel task assignments. Some of the
4) Elements include organizational structure, procedures, processes and resources. common software measurements include:
5) Ensures quality planning, quality control, quality assurance and quality improvement. I. Code coverage
2. Cohesion
CMM: The CMM model was developed by SET (Software Engineering Institute) of 3. Coupling
Carnegie-Mellon University in 1986. The model is a strategy for improving the software 4. Cyclomati~ complexity (McCabe's complexity)
process, irrespective of the actual life cycle model used. It is used to judge the maturity of 5. DSQJ (design structure quality index)
the software processes of an organization and to identify the key practices. The CMM is 6. Function Points and Automated Function Points
organized into five maturity levels as shown in figure above. The five maturity models 7. Halstead Complexity
are summarized as follows: 8. Instruction path length
9. Maintainability index
SWE-94 SWE-95
-
-► - - - - - - - - ---............
~
POPULAR PUBLICATIONS

I 0. Number of classes and interfaces


11.LOC

0-0 _,Q ::9


12. Program·execution time
13. Program load time
Program size (binary)
E=2 N=4 P- I

f) Function point method:


Refer to Question No. 2 (2"d Part) of Long Answer Type Questions.
· ring· · its functionality. It is
h) Software Re-eng•~::e g pa~ or all of a system without changing require frequent
g) Cyclomatic complexity: Restructuring or rewn in II) subsystems of a larger system
!'cable when some (but not a
Cyclomatic complexity is a s_oftware m~tri_c (measurement), used to indicate the app i
maintenance. . . Th e re engineered system
. . h ff, rt to make it easier to maintain.
complexity of a program. It 1s a quantitative measure of the number of linearly . Ives putting in t e e o d
independent paths through a program's source code. invo
It
may also be restructure d an d should
. ?
be re-documente .
McCabe's Cyclomatic complexity When do you decide to reengineer . b stem the subsystem needs to be
I. When system changes are confined to one su sy '
Cyclomatic complexity introduced by Thomas McCabe in 1976. It simply measures the reengineered b I
amount of decision logic in the program module. Cyclomatic complexity gives the 2. When hardware or software support become_s o so _ete
minimum number of paths that can generate all possible paths through the module 3. When tools to support restruc_turing are readily available
Cyclomatic complexity is often referred to as McCabe's complexity. McCabe'~ The Process diagram for Re-engineering
complexity used to define minimum number of test cases required for a module and it is
used during software development lifecycle to quantify maintainability and testability, fa1sung software Re-engineered
Undemanding and
Cyclomatic complexity is defined as system system
1ransformJl1on
CC =E-N + P Sotho.are re-engineer mg
Where
E = the number of edges of the graph Re-engineering advantages
N = the number of nodes of the graph Reduced risk
P = the number of connected components There is a high risk in new software development. There may be development problems,
In case of connected graph staffing problems and specification problems
CC=E-N+2 Reduced cost
fn simplified way it can be defined as The cost of re-engineering is often significantly less than the costs of developing new
CC=D+I software
Where Re-engineering cost factors
D = the number of decision points in the graph The quality of the software to be re.-engineered
The tool support available for re-engineering
For example: The extent of the data conversion which is required

E=I
Q--0
N=2 P= I CC=l-2+2=1
The availability of expert staff for re-engineering
Thus the key points of Re-Engineeri ng are:
Reverse
its sourceengineering
code. is the process of deriving the system design and specification from

Progr_am
and Slructu~e.
simple improvement replaces unstructured control constructs with while loops
cond1t1ons.
Program d I 1· · ·
D m~ u ~ sat1on involves reorganisation to group related items
ata re-engineenng may be necessary because of inconsistent data management
E=4 N=4 P= I cc = 4-4+2 =2

SWE-96
SWE-97
POPULAR euaucATIONS

i) Black box testing: . . .


Black-box testing is a method of ~oftware. tes:inrhat examtes.~he ~nct1onality of an
application based on the specifications. ~t 1s a soh. nown asf pe~1 1cadtto.ns based testing
Independent Testing Team usually per,orms t I~ type o testtng llrtng the softwar~
testing life cycle. This meth.od of test can be applied to ea~h and every level of software
testkca~~/~:ason t~ey might not ~ork isd
wor .
program can eas1
b::~se
·1y introduce errors into co e
-
II the old capabilities still
run a ainst the new versio~ to make s~~:ntht~ga or adding new code to a
not in~ended to be changed.

testing such as unit, integratton, system ~d acceptance te~tmg. . n & load testing: . h lication and ensure that its
There are different techniques involved m Black Box testing. k) I~tegra:~~n test of an application requires runn~ng ~ e ai~ functional type of testing
•• Equivalence Class An integr~ I ted Though load testing is no
b. Boundary Value Analysis ~:~:i~::~~~i:~r:s:tee~~e;erf~rmanc e .und~~: siheeci;~cp~i:~;i~~db~haad~es when m~ltiple
c. Domain Tests This purpose of Load Test is to determine d T fn is to ensure smooth function~ng
cl. Orthogonal Arrays users access it si multaneously. The goal od~ ~oa Les~ ~esting is non-functional testing
e. Decision Tables d r real life load con 1t1ons. oa
f. State Models of the sdo.flwaruebsuent oef Perf~rmance Testing. Load testing usually identifies -
type an 1s a s
g. Exploratory Testing • The maximum operating capacity of an app 11~at1on · ·
.
b. All-pairs testing • Determine whether the current infrastructure is sufficient lo run the app lication
• Sustainability of application with respect l~ pe.ak user load d calabilit to
Types of Black Box Testing Number of concurrent users that an appl1cat1on can support, an s Y
There arc many types ofBlack Box Testing but following are the prominent ones. allow more users to access it.
Functional testing - This black box testing type is related to functional requirements of a
system; it is done by software testers. In Software Engineering, Load testing is commonly used for the Client/Server, .Web-
Non-functional testing - This type of black box testing is not related to testing of a based applications - both Intranet and Internet. The chief metric for load testing
is
specific functionality, but non-functional requirements such as performance, scalability, response time. The parameters are as follows: . .
usability. I. Whether the response time is already measured and compared - Quant1lat1v
e
Regression testing - Regression Testing is done after code fixes, upgrades or any other 2. Whether the response time is applicable lo the business process - Relevant
system maintenance to check the new code has not affected the existing code. 3. Whether the response time is justifiable - Realistic
4. Whether the response time is achievable - Achievable
Black box testing strategy: S. Whether the response time is measurable using a tool or stopwatch - Measurable
Following are the prominent Test Strategy amongst the many used in Black box Testing
Equivalence Class Testing: It is used to minimize the number of possible test cases to The.re are ma.ny numbers of ways to perform load testing. Following are a few load
testing strategies-
an optimum level while maintains reasonable test coverage.
Boundary Value Testing: Boundary value testing is focused on the values at boundaries. • Manual Load Testing: This.is one of the strategics to execute load testing, but it
This technique determines whether a certain range of values are acceptable by the system does no.I pr~duce r~pcatablc results, cannot provide measurable levels of stress on
an appltcat1on and 1s an impossible process to coordinate.
or not. It is very useful in reducing the number of test cases. It is mostly suitable for the
systems where input is within certain ranges. • ~n house developed load testing tools: An organization, which realiLes the
Decision Table Testing: A decision table puts causes and their effects in a matrix. There importance of load testing, may build their own tools to execute load tesls
is unique combination in each column. • Open source load testing tools: There arc several load testing tools availab le as
0
;~~d\: u~t~~P~~t a~e '.~cc of charge. They may not be as sophisticated as their
j) Regression Testing: Ente . I s, ut I you a1c on a budget, they are the best choice
rpnse-c ass load testing t 0 I . Th
Regression testing is the process of testing changes to computer programs to m~ke ~ure facility They
· °
support a 1argc numbc
·
s. cy usually come with capture/playback
that the older programming still works with the new changes. Regression testing 15 a exceptionally large nu be f Of I ,
m r o users. r protoco s. fhcy can simulate an
nonnal part of the program development process and, in larger companies, is done. by
code testing specialists. Test department coders develop code test scenarios and exercises Load testing guidelines
that will test new units of code after they have been written. These test cases fonn wha~ I. Load testing should be planned . .
becomes the test bucket. Before a new version of a software product is released, the 01 2. A large number of . d once the application becomes functionally stable
unique ala should be ready in the data pool .
SWE-98 SWE-99
- - - - - - - : - - - - - ----.... ~

p popUlAR pueucATIQNS - SQ~ARE ENGfNEERrNG

3. Number of users shoul_d be decided for each sce~ario or scripts


4. A void creation of detailed logs to conserve the disk TO space . . . dual units of source
5. Try ro avoid downloading of images in the site . . . is a method by which ind1v1 t testable part of an
6. The consistency of response time over the elapsed period should be Aoswe\ter programmi~g, ~nit test~gfit for use. A unit is the sm~l:i:idual function or
same should be compared with various test runs 1ogged & 1/ie In comp tested to determine if they a in a unit may be an in hite box testers.
code ar~ n In procedural programm gmmers or occasionally by w thod stubs mock
Some oftbe Load Testing Tools a re apphcad 11: Unit tests are created by pr6ogra the others: substitutes like ml e_ ·solatio~. Unit
proce ur · . · dependent rom . modu e in 1 •
_ LoadNinja: LoadNinja is revolutionizing th: way we load test. This cloud-b Ideally, each test case is rn can be used to assist testing a that code meets its
load resting tool empowers teams to record & instantly playback comprehe . ased objects, fake_s a;;d tes~:e~rr:~Je:Un by software developers to e~~: being very manual
tests without complex dynamic correlation & run these load tests in real bnsive load tests are typ1ca y wn . ded Its implementat1on can v~
scale.' Teams are able to increase
. rowsers¾a1
test coverage. & cut load testing time by over design and behaves : _rnte; rm~lized as part of build automatIO~-b . ted "l&T") is the
_ NeoLoad: NeoLoad is ~he enterpris~-grade load ~esting pla~forrn designed for 60 A '· (pencil '.'11d pap~r) tio:;t1m~s called Integration and Testing, a ;e;~~bined and tested
and DevOps. NeoLoad integrates with your continuous delivery pipeline to g,le lntegr~11on :.~egtesting in which individual software modtle~ ~ntegration testing tal<es
performance testing across the complete software lifecycle - from component?~" phase :us~ It occurs after unit testing ~nd before syst::h:: Ii~ iarger aggregates, applies
system-wide load tests. 0 II as~~ pt modules that have been unit tested, group d delivers as its output the
as itsdefine
tests mpu d m an integration test plan to those aggregates, an
.
Load Runner: integrated system ready for system testing.
Load runner is HP tool used to test the appl!catio~s under normal and peak load [MODEL QUESTI ON]
9. Design a test suite for testing your binary search func t·ion.
conditions. Load runner generates load by creatmg Virtual users that emulate network
traffic. It simulates real time usage like a production environment and gives graphical Answer:
results. Path:
1. 1-11
2. 1-2-3-IO
8. a) What is the difference betwee n a coding standard and coding guideli ne? Why
3. 1-2-4-5-9-10-11
are thNe considered Important in a s o ftware development organization?
4. l-2-4-6-7-8-9-10-I I
{MODEL QUESTION) 5. 1-2-4-6-8-9-10-11
Answer:
Coding guideline:
Path 1-11
A rule about how you are to write your code so that it will be consistent, easily Test case: (low>high) •
understood and robust.
Coding standard: . Path: 1-2-3-10
A rule about how you are to write your code so that it will be consisten~ easily (low=high) and (key< b(mid])
understood and robust and so that it will be acceptable to the entity that is paying you to (low<high) and (key< b(mid])
write the code.
Though at initial stages it seems like a burden to follow standard, its advantages become Path: 1-2-4-5-9-10-11
visible once the software grows to few thousand lines spanning few hundred files. Some (/ow=high) and (Key=b(mid)) and (Key >b[mid])
of the advantages are: . . . . he (low=high) and (Key>b[mid]) and (Key >b[mid])
Programmer feels co m fortable with the code written by others, as it 1s similar to what (low<h!gh) and (Key=b[mid]) and (Key >b[mid])
himself would have written. .. 'th (low<h1gh) and (Key>b[mid]) and (Key >b[mid])
Person joining the group at later stage can pickup the code easily (once he is familiar wi
the standards). Path: 1-2-4-6-7-8-9-10-1 l
0
C/ w=h!gh) and (Key=b[mid]) and (Key <b[mid]) and (b[mid]=key)
b) WhY are the three different levels of testing - • testing,
un,t · · t eg ration
'" . thetesting
main [i°w=h~gh) and (Key=b[mid]) and (Key =b[mid]) and (b[mid]= key)
1
•nd Pf•m testing - is necessary to the software development? Wh at 15 E-rroNJ ow=high) and (Key>b[mid]) and (Key =b[mid]) and (b[mid]=key)
Pc.tl'J)Ose of each of these different levels of testing? [MODEL QU .,

SWE-1 00 SWE-101

You might also like