Anda di halaman 1dari 50

https://edurev.

in/studytube/Software-Engineering-MCQ-with-answers/32fa665e-dd31-4709-bce9-
8b7851aa915d_p#

https://www.scribd.com/doc/144118425/Software-Engineering-Solved-Mcqs

logic

x'y’+y =x'+y

A+A’B=A+B


 The CPU utilization =1- pn
 Avg MA=h*hit+(1-h) miss
 Assume N segments in memory and a page size of P bytes. The wastage on account of
internal fragmentation is NP/2 bytes.
 Number of spanning trees in a complete graph with n vertices is n (n-2).

A grammar is LL(1) if it is possible to choose the next production by looking at only the next
token in the input string.
Formally, grammar G is LL(1) if and only if

For all productions A → α1 | α2 | ... | αn,

First(αi) ∩ First(αj) = ∅, 1 ≤ i,j ≤ n, i ≠ j.

For every non-terminal A such that First(A) contains ε,

First(A) ∩ Follow(A) = ∅

 Number of reflexive relations is 2n -n which is 220 for n = 5


2

Full binary tree = strictly binary tree =if each node in the tree is either a leaf node or has exactly
two children.

Slotted aloha

Pure aloha

Hamming error detection & correction t+1 and 2t+1

the maximum window size in sliding window protocol =4

maximum number of keys stored in a B-tree of order m and depth d is m(d+1)–1

Number of connected components in undirected graph can simply calculated by doing


a BFS or DFS. The best possible time complexity of BFS and DFS is O(m + n).

RFE (Return From Exception) is a privileged trap instruction that is executed when exception
occurs, so an exception is not allowed to execute.
If record are accessed for a particular value from table, hashing will do better. If records are
accessed in a range of values, ordered indexing will perform

Binary Trees

1. Total no of Binary Trees are =


2. Summing over i gives the total number of binary search trees with n

nodes.
The base case is t(0) = 1 and t(1) = 1, i.e. there is one empty BST and there is one BST with one
node.

a binary tree T is if each node is either a leaf or possesses exactly two child nodes.

a binary tree T with n levels is complete if all levels except possibly the last are completely full, and the last level has
all its nodes to the left side.

Time Comlexity of the Dijkstra’s algorithm is O(|V|^2 + E)


* Time Comlexity of the Warshall’s algorithm is O(|V|^3)
* DFS cannot be used for finding shortest paths
* BFS can be used for unweighted graphs. Time Complexity for BFS is O(|E| + |V|)

For an n-ary tree where each node has n children or no children, following
relation holds
L = (n-1)*I + 1

The height of a Max Heap is Θ(logn). If we perform binary search for finding the
correct position then we need to do Θ(LogLogn) comparisons.

What is the time complexity of the following recursive function:


int DoSomething (int n)
{
if (n <= 2)
return 1;
else
return (DoSomething (floor(sqrt(n))) + n);
}
Run on IDE
(A) Θ(n)
(B) Θ(nlogn)
(C) Θ(logn)
(D) Θ(loglogn)
Answer (D)
The order of a leaf node in a tree B+ ? is the maximum number of (value, data record pointer)
pairs it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long, the
value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of the leaf
node?

Let order of leaf be m. A leaf node in B+ tree contains at most m record pointers, at most m
values, and one disk block pointer. r*m + V*m + p <= 1024 16m <= 1018 m =< 63

Round Trip propagation delay = 80ms

Frame size = 32*8 bits

Bandwidth = 128kbps

Transmission Time = 32*8/(128) ms = 2 ms

Let n be the window size.

UtiliZation = n/(1+2a) where a

= Propagation time /

transmission time

= n/(1+80/2)

For maximum utilization: n = 41

T (n) = aT (n/b) + f (n),


Worst case complexities for the above sorting algorithms are as follows:
Merge Sort — nLogn
Bubble Sort — n^2
Quick Sort — n^2
Selection Sort — n^2

Which of the following grammar is LR (1)?


(A) AaAb, AbAb, Aa , Ab
(B) AaAa, AaAb, Ac
(C) AA+A, Aa
(D) Both (A) and (B)
Answer: D

A shift-reduce parser arries out the actions specified within braces immediately after reducing with the
corresponding rule of the grammar.

SxxW[print“1”]
Sy[print“2”]
WS2[print“3”], what is the translation of “x x x x y z z”?
(A) 1 1 2 3 1
(B) 1 1 2 3 3
(C) 2 3 1 3 1
(D) 2 3 3 2 1
Answer: C

34. Context-free Grammar (CFG) can be recognized by

(A) Finite state automata


(B) 2-way linear bounded automata
(C) push down automata
(D) both (B) and (C)
Answer: D
35. Synthesized attribute can be easily simulated by a
(A) LL grammar
(B) Ambiguous grammar
(C) LR grammar
(D) None of the above
Answer: C
Consider n processes sharing the CPU in round robin fashion. Assuming that each process switch takes s seconds.
What must be the quantum size q such that the overhead resulting from process switching is minimized but, at
the same time each process is guaranteed to get its turn at the CPU at least every t seconds ?

Answer: B

A formula is satisfiable if there is atleast one assignment for which it is true.

Clearly this formula is satisfiable as there are 7 assignments for which it is true.

A formula is valid if it is true for all assignments

Inorder traversal of a BST always gives elements in increasing order.

Let R and S be any two equivalence relations on a non-empty set A.


R ∩ S is an equivalence relation
Graph independent set decision problem is NP Complete.

NDPDA can handle languages or grammars with ambiguity, but DPDA cannot
handle languages with ambiguity and any context-free grammar.

hreads share address space of Process. Virtually memory is concerned with processes not
with Threads. A thread is a basic unit of CPU utilization, consisting of a program counter, a
stack, and a set of registers, (and a thread ID.) As you can see, for a single thread of control -
there is one program counter, and one sequence of instructions that can be carried out at any
given time and for multi-threaded applications-there are multiple threads within a single
process, each having their own program counter, stack and set of registers, but sharing
common code, data, and certain structures such as open files.
An organization has a class B network and wishes to form subnets for 64
departments. The subnet mask would be:
(a) 255.255.0.0
(b) 255.255.64.0
(c) 255.255.128.0
(d) 255.255.252.0
Answer (d)

The size of network ID is 16 bit in class B networks. So bits after 16th bit must
be used to create 64 departments. Total 6 bits are needed to identify 64
different departments. Therefore, subnet mask will be 255.255.252.0.
Match
the following:

a. TTL i. High component density

b. ECL ii. Low power consumption

c. MOS iii. Evolution of “diodetransistor- logic”

d. CMOS iv. High speed digital circuits

Codes:

a b c d

(A) iii ii i iv
(B) i iv iii ii

(C) iii iv i ii

(D) i ii iii iv

Answer: C
Are we building the right product?

This statement refers to

(A) Verification

(B) Validation

(C) Testing

(D) Software quality assurance

Answer: B

right product Validation

product right verification


Read more: http://www.netcomputerscience.com/2018/02/ugc-net-computer-science-paper-iii-
june2012-p4.html#ixzz58lz6Zg5S
According to Amdahl's law, in case of parallelization,if P is the proportion of the program that can be
made parallel, then (1-P) is the proportion that cannot be parallelized. Then the maximum speedup that can
be achieved by using N processor is, S(N)=1/(1-P)+P/N where N refers to the no of processors, and P refers
to the proportion that can be parallelized.
In the question above, no of processor, N=64
The proportion of the program that can be made parallel, P = 70%=0.7
So, substituting in the formula, we get, 1/(1-0.7)+0.7/64=1/0.3+0.0109375=1.0.310975
=3.215
=3.22

Consider a project with the following functional units :


Number of user inputs = 5050
Number of user outputs = 4040
Number of user enquiries = 3535
Number of user files = 0606
Number of external interfaces = 0404
Assuming all complexity adjustment factors and weighing factors as average, the function points
for the project will be

A. 135

B. 722
C. 675

D. 672

P(function point)=UFP*CAF where CAF=complex adjustment factor and= [0.65+0.01 x ΣFi ]


Fi i=1 to 14 are the degree of influence
UFP=unadusted function points = Σ Wij Zij(i=1 to 5)

computing function points 0---no infuence 1---incidental 2----moderate 3----average 4-------


significant 5-----essential
based on 14 questions
function points components and weights as below
s/w components weighting factors
simple average complex
No. of user inputs 3 4 6
No. of user outputs 4 5 7
No. of user inquires 3 4 6
No. of files 7 10 15
No. of external interfaces 5 7 10

22 30 46

now coming to question


UFP=ΣWijZij=50x4+ 40x5+ 35x4+ 6x10 +4x7=628 as all weighting factors are avg
CAF= (0.65+0.01(14x3)=1.07
FP=UFP*CAF=628X1.07=672 APPROX. hence ans is D
The upper bound of computing time of m coloring decision problem is

(A) O(nm)

(B) O(nm)

(C) O(nmn)

(D) O(nmmn)

Answer: C

Which one of the following statements is incorrect?

(A) The number of regions corresponds to the cyclomatic complexity.

(B) Cyclometric complexity for a flow graph G is V(G) = N–E+2, where E is the number of edges and N is the
number of nodes in the flow graph.

(C) Cyclometric complexity for a flow graph G is V(G) = E–N+2, where E is the number of edges & N is the
number of nodes in the flow graph.

(D) Cyclometric complexity for a flow graph G is V(G) = P + 1, where P is the number of predicate nodes
contained in the flow graph G.

Answer: B R, P+1, E–N+2

Read more: http://www.netcomputerscience.com/2018/02/ugc-net-computer-science-paper-iii-


june2012-p4.html#ixzz58lxMdjjK

Read more: http://www.netcomputerscience.com/2018/02/ugc-net-computer-science-paper-iii-


june2012-p4.html#ixzz58lwVAJoG
Using data p=3, q=11, n=pq, d=7 in RSA algorithm find the cipher text of the given plain text SUZANNE

(A) BUTAEEZ (B) SUZANNE

(C) XYZABCD (D) ABCDXYZ

Encryption RSA algorithm


Cipher text = ((plaintext)^e)mod n
From the given problem we know p =3,q = 11, d =7, n=33 find z :: z = ((p-1)*(q-1)) => 2*10 = 20
Find 'e' or 'd' using the given method : (de) mod z = 1
Therefore (7e)mod 20 = 1 => with trail and error giving e =3, => (7*3)mod 20 = 1
Finding e=3 we go to the encryption by converting the given plain text equivalent number starting
a=1,b=2...z=26
Therefore SUZANNE = 19,21,26,1,14,14,5 taking single character and apply encryption
(19^3) mod 33 = 28 ie (28-26) = 2 => B
(21^3) mod 33 = 21 => U
(26^3)mod 33 = 20 => T
(1^3)mod 33 = 1 => A
(14^3)mod 33 = 5 =>E
(5^3)mod 33 = 26 => Z

https://www.tutorialspoint.com/digital_electronics/hamming_code_example_with_oddparity.asp
http://users.cis.fiu.edu/~downeyt/cop3402/hamming.html

Layout Engines and Web Browsers

▪ Blink Chrome, Opera 15+

▪ Gecko Firefox, Netscape, SeaMonkey, …

▪ Trident Internet Explorer, Maxthon

▪ WebKit Old Chrome, Safari

▪ Presto and others Old Opera

What is Web 1.0?

▪ Before 1999 “Read-Only” web

▪ Sites are static. They might contain useful information, but there's no reason for a visitor to return to the site

later.

▪ Low variety of content

▪ Sites aren’t interactive

▪ Applications are proprietary

What is Web 2.0?

▪The writing and participating web (User-generated content) ▪ New applications may allow every users to interact and
collaborate with each other in a social media dialogue as creators of content

▪ Rich Internet Applications (RIA)

▪ Social Web

▪ Web-Oriented Architecture (WOA)

▪ RSS, Web services, feeds, etc.

Web 3.0

▪ "Semantic Web" is sometimes used as a synonym for "Web3.0“

▪ The Web 3.0 browser will analyze your response, search


the Internet for all possible answers, and then organize

the results for you

▪ Artificial intelligence

▪ Personalization

▪ Mobility

▪ Semantic Web

Web 4.0

▪ “The next Web” – the ultra-intelligent electronic agent

▪ Recognize you when you get in front of it because all of your devices are getting a little camera

▪ And with facial recognition, they’ll know it’s you

▪ Web 4.0 is often characterized as the Web OS

▪ The entire web being a single operating system where information flows from any one point to any other
▪ Cloud ≈ multiple hardware machines combine their computing power and resources

▪ Share them between multiple applications

▪ To save costs and use resources more efficiently

▪ Public clouds

▪ Provide computing resources on demand

▪ Publicly in Internet

▪ Paid or free of charge (to some limit)

▪ Amazon AWS, Google App Engine, Microsoft Azure, Rackspace, AppFog, Heroku, AppHarbor,

Cloud Computing Models

▪ Infrastructure as a Service (IaaS)

▪ Virtual machines in the cloud on demand

▪ Users install the OS and software they need

▪ Platform as a Service (PaaS)

▪ Platform, services and APIs for developers

▪ E.g. Java + JBoss + JSF + JPA + MongoDB or JavaScript +

Node.js + MongoDB + RabbitMQ

▪ Software as a Service (SaaS)

▪ Hosted application on demand (e.g. WordPress)

A port number is used to distinguish between the individual networking applications that are running simultaneously
above the TCP/IP protocol stack

• Port numbers for standard TCP/IP services may be referred to as well-known port numbers

– 80 HTTP (Hypertext Transfer Protocol) - WWW

– 194 IRC (Internet Relay Chat) - Conferencing

– 21 FTP (File Transfer Protocol)

– 25 SMTP (Simple Mail Transfer Protocol) - E-mail

– 23 Telnet
Port Number
--- Description
1 TCP Port Service Multiplexer (TCPMUX)

5 Remote Job Entry (RJE)

7 ECHO

18 Message Send Protocol (MSP)

20 FTP -- Data

21 FTP -- Control

22 SSH Remote Login Protocol

23 Telnet

25 Simple Mail Transfer Protocol (SMTP)

29 MSG ICP

37 Time

42 Host Name Server (Nameserv)

43 WhoIs

49 Login Host Protocol (Login)

53 Domain Name System (DNS)

69 Trivial File Transfer Protocol (TFTP)

70 Gopher Services

79 Finger

80 HTTP

103 X.400 Standard

108 SNA Gateway Access Server

109 POP2

110 POP3

115 Simple File Transfer Protocol (SFTP)

118 SQL Services

119 Newsgroup (NNTP)

137 NetBIOS Name Service

139 NetBIOS Datagram Service

143 Interim Mail Access Protocol (IMAP)

150 NetBIOS Session Service

156 SQL Server

161 SNMP

179 Border Gateway Protocol (BGP)

190 Gateway Access Control Protocol (GACP)

194 Internet Relay Chat (IRC)


197 Directory Location Service (DLS)

389 Lightweight Directory Access Protocol (LDAP)

396 Novell Netware over IP

443 HTTPS

444 Simple Network Paging Protocol (SNPP)

445 Microsoft-DS

458 Apple QuickTime

546 DHCP Client

547 DHCP Server

563 SNEWS

569 MSN

1080 Socks

 Well-known ports range from 0 through 1023.


 Registered ports are 1024 to 49151.
 Dynamic ports (also called private ports) are 49152 to 65535.
Internet protocol suite

Application layer

BGP DHCP DNS FTP HTTP IMAP LDAP MGCP MQTT NNTP NTP POP ONC/RPC RTP RTSP RIP SIP SMTP SNMP SSH Telnet
TLS/SSL XMPP more...

Transport layer

TCP UDP DCCP SCTP RSVP more...

Internet layer

IP IPv4 IPv6 ICMP ICMPv6 ECN IGMP IPsec more...

Link layer

ARP NDP OSPF Tunnels L2TP PPP MAC Ethernet DSL ISDN FDDI more...

When to Use GET?


The default method when submitting form data is GET.

However, when GET is used, the submitted form data will be visible in the page
address field:

/action_page.php?firstname=Mickey&lastname=Mouse

Notes on GET:

 Appends form-data into the URL in name/value pairs

 The length of a URL is limited (about 3000 characters)

 Never use GET to send sensitive data! (will be visible in the URL)

 Useful for form submissions where a user want to bookmark the result

 GET is better for non-secure data, like query strings in Google

When to Use POST?


Always use POST if the form data contains sensitive or personal information. The POST
method does not display the submitted form data in the page address field.

Notes on POST:
 POST has no size limitations, and can be used to send large amounts of data.

 Form submissions with POST cannot be bookmarked


In Manchester encoding, the bitrate is half of the baud rate.
Given p=3,q=11. n=(p X q) = (3 X 11)=33
m=(p-1)X(q-1) = (2 X 10)=20
Find a small odd integer e, that is relatively prime to m.
If e=3, then GCD(3,20)=1. e should be small and prime and so we let e=3.
d is given, d=7.
Public key = (e,n). (Values of e and n are known).
To encrypt a message, we apply the public key to the function
E(s) = se(mod n)

where s is the given message and e and n represent the public key integer pair. In the above
question, the plain text M = 5. Plain text needs to be encrypted using the above formula.
=53(mod 33)
= 125 (mod 33)
= 26
As a result, the encrypted message E(s) = 26.
Closed Under RE DCFL CFL CSL RE RE
G C
Union ᴗ Y N Y Y Y Y
Intersection ᴖ Y N N Y Y Y
Complement ' Y Y N Y Y N
Difference - Y N N Y Y N
Reverse R Y Y Y Y Y Y
Regular Intersection Y Y Y Y Y Y
Concatenation . * + λ Y N Y Y Y Y
Homomorphism Y N Y N N Y
Inverse Homomorphism Y Y Y Y Y Y
Right Quotient with a Regular language Y Y Y N Y
Left Quotient with a Regular language Y Y Y N Y
UID.H CID H H CD
Reverse, Regular language Intersection, Inverse Homomorphism => Y
Concatenation . * + λ => Same
Different Types of SQL JOINs
Here are the different types of the JOINs in SQL:

 (INNER) JOIN: Returns records that have matching values in both tables

 LEFT (OUTER) JOIN: Return all records from the left table, and the matched
records from the right table

 RIGHT (OUTER) JOIN: Return all records from the right table, and the matched
records from the left table

 FULL (OUTER) JOIN: Return all records when there is a match in either left or
right table

A theta join allows for arbitrary comparison relationships (such as ≥).


An equijoin is a theta join using the equality operator.
A natural join is an equijoin on attributes that have the same name in each relationship.
Additionally, a natural join removes the duplicate columns involved in the equality comparison so only 1
of each compared column remains; in rough relational algebraic terms: ⋈ = π a ○ ⋈a a
R,S- s R= S

Theta Join, Equijoin, and Natural Join are called inner joins. An inner join includes
only those tuples with matching attributes and the rest are discarded in the resulting
relation.

Black box testing techniques


White box testing techniques

USER LEVEL THREAD KERNEL LEVEL THREAD


User thread are implemented by users. kernel threads are implemented by OS.
OS doesn’t recognized user level threads. Kernel threads are recognized by OS.
Implementation of User threads is easy. Implementation of Kernel thread is complicated.
Context switch time is less. Context switch time is more.
Context switch requires no hardware
Hardware support is needed.
support.
If one user level thread perform blocking
If one kernel thread perform blocking operation
operation then entire process will be
then another thread can continue execution.
blocked.
Example : Java thread, POSIX threads. Example : Window Solaris.

Process Thread

An executing instance of a program is A thread is a subset of the


Definition
called a process. process.
It has its own copy of the data segment of It has direct access to the data
Process
the parent process. segment of its process.

Processes must use inter-process Threads can directly


Communication communication to communicate with communicate with other
sibling processes. threads of its process.

Threads have almost no


Overheads Processes have considerable overhead.
overhead.

New processes require duplication of the New threads are easily created.
Creation
parent process.

Threads can exercise


Processes can only exercise control over
Control considerable control over
child processes.
threads of the same process.

Any change in the main thread


Any change in the parent process does not
Changes may affect the behavior of the
affect child processes.
other threads of the process.

Memory Run in separate memory spaces. Run in shared memory spaces.

File descriptors
Most file descriptors are not shared. It shares file descriptors.

File system There is no sharing of file system context. It shares file system context.

Signal It does not share signal handling. It shares signal handling.

Process is controlled by the operating Threads are controlled by


Controlled by
system. programmer in a program.

Dependence Processes are independent. Threads are dependent.


Types of parser

Top down parser Bottom up parser

Backtracking Predictive parser Shift Reduce parser LR parser

Recursive descent LL(1) parser SLR parser LALR parser (C) LR parser
The Design and Analysis of Algorithms ( Anany Levitin)

1Introduction
1.1 What Is an Algorithm? 3
Exercises 1.1 7
1.2 Fundamentals of Algorithmic Problem Solving 9
Understanding the Problem 9
Ascertaining the Capabilities of the Computational Device 9
Choosing between Exact and Approximate Problem Solving 11
Algorithm Design Techniques 11
Designing an Algorithm and Data Structures 12
Methods of Specifying an Algorithm 12
Proving an Algorithm’s Correctness 13
Analyzing an Algorithm 14
Coding an Algorithm 15
Exercises 1.2 17
1.3 Important Problem Types 18
Sorting 19
Searching 20
String Processing 20
Graph Problems 21
Combinatorial Problems 21
Geometric Problems 22
Numerical Problems 22
Exercises 1.3 23
1.4 Fundamental Data Structures 25
Linear Data Structures 25
Graphs 28
Trees 31
Sets and Dictionaries 35
Exercises 1.4 37
Summary 38

2 Fundamentals of the Analysis of Algorithm Efficiency


2.1 The Analysis Framework 42
Measuring an Input’s Size 43
Units for Measuring Running Time 44
Orders of Growth 45
Worst-Case, Best-Case, and Average-Case Efficiencies 47
Recapitulation of the Analysis Framework 50
Exercises 2.1 50
2.2 Asymptotic Notations and Basic Efficiency Classes 52
Informal Introduction 52
O-notation 53
_-notation 54
_-notation 55
Useful Property Involving the Asymptotic Notations 55
Using Limits for Comparing Orders of Growth 56
Basic Efficiency Classes 58
Exercises 2.2 58
2.3 Mathematical Analysis of Nonrecursive Algorithms 61
Exercises 2.3 67
2.4 Mathematical Analysis of Recursive Algorithms 70
Exercises 2.4 76
2.5 Example: Computing the nth Fibonacci Number 80
Exercises 2.5 83
2.6 Empirical Analysis of Algorithms 84
Exercises 2.6 89
2.7 Algorithm Visualization 91
Summary 94
3 Brute Force and Exhaustive Search
3.1 Selection Sort and Bubble Sort 98
Selection Sort 98
Bubble Sort 100
Exercises 3.1 102
3.2 Sequential Search and Brute-Force String Matching 104
Sequential Search 104
Brute-Force String Matching 105
Exercises 3.2 106
3.3 Closest-Pair and Convex-Hull Problems by Brute Force 108
Closest-Pair Problem 108
Convex-Hull Problem 109
Exercises 3.3 113
3.4 Exhaustive Search 115
Traveling Salesman Problem 116
Knapsack Problem 116
Assignment Problem 119
Exercises 3.4 120
3.5 Depth-First Search and Breadth-First Search 122
Depth-First Search 122
Breadth-First Search 125
Exercises 3.5 128
Summary 130

5 Divide-and-Conquer
5.1 Mergesort 172
Exercises 5.1 174
5.2 Quicksort 176
Exercises 5.2 181
5.3 Binary Tree Traversals and Related Properties 182
Exercises 5.3 185
5.4 Multiplication of Large Integers and
Strassen’s Matrix Multiplication 186
Multiplication of Large Integers 187
Strassen’s Matrix Multiplication 189
Exercises 5.4 191
5.5 The Closest-Pair and Convex-Hull Problems
by Divide-and-Conquer 192
The Closest-Pair Problem 192
Convex-Hull Problem 195
Exercises 5.5 197
Summary 198

8 Dynamic Programming 283


8.1 Three Basic Examples 285
Exercises 8.1 290
8.2 The Knapsack Problem and Memory Functions 292
Memory Functions 294
Exercises 8.2 296
8.3 Optimal Binary Search Trees 297
Exercises 8.3 303
8.4 Warshall’s and Floyd’s Algorithms 304
Warshall’s Algorithm 304
Floyd’s Algorithm for the All-Pairs Shortest-Paths Problem 308
Exercises 8.4 311
Summary 312
9 Greedy Technique 315
9.1 Prim’s Algorithm 318
Exercises 9.1 322
9.2 Kruskal’s Algorithm 325
Disjoint Subsets and Union-Find Algorithms 327
Exercises 9.2 331
9.3 Dijkstra’s Algorithm 333
Exercises 9.3 337
9.4 Huffman Trees and Codes 338
Exercises 9.4 342
Summary 344

11 Limitations of Algorithm Power 387


11.1 Lower-Bound Arguments 388
Trivial Lower Bounds 389
Information-Theoretic Arguments 390
Adversary Arguments 390
Problem Reduction 391
Exercises 11.1 393
11.2 Decision Trees 394
Decision Trees for Sorting 395
Decision Trees for Searching a Sorted Array 397
Exercises 11.2 399
11.3 P, NP, and NP-Complete Problems 401
P and NP Problems 402
NP-Complete Problems 406
Exercises 11.3 409
11.4 Challenges of Numerical Algorithms 412
Exercises 11.4 419
Summary 420

12 Coping with the Limitations of Algorithm Power 423


12.1 Backtracking 424
n-Queens Problem 425
Hamiltonian Circuit Problem 426
Subset-Sum Problem 427
General Remarks 428
Exercises 12.1 430
12.2 Branch-and-Bound 432
Assignment Problem 433
Knapsack Problem 436
Traveling Salesman Problem 438
Exercises 12.2 440
12.3 Approximation Algorithms for NP-Hard Problems 441
Approximation Algorithms for the Traveling Salesman Problem 443
Approximation Algorithms for the Knapsack Problem 453
Exercises 12.3 457
12.4 Algorithms for Solving Nonlinear Equations 459
Bisection Method 460
Method of False Position 464
Newton’s Method 464
Exercises 12.4 467
Summary 468
SOFTWARE ENGINEERING

CHAPTER 1 THE PRODUCT 3


1.1. The Evolving Role of Software 4
1.2. Software 6
1.2.1. Software Characteristics 6
1.2.2. Software Applications 9
1.3. Software: A Crisis on the Horizon? 11
1.4. Software Myths 12
1.5. Summary 15
REFERENCES 15
PROBLEMS AND POINTS TO PONDER 16
FURTHER READINGS AND INFORMATION SOURCES 17

CHAPTER 2 THE PROCESS 19


2.1 Software Engineering: A Layered Technology 20
2.1.1 Process, Methods, and Tools 20
2.1.2 A Generic View of Software Engineering 21
2.2 The Software Process 23
2.3 Software Process Models 26
2.4 The Linear Sequential Model 28
2.5 The Prototyping Model 30
2.6 The RAD Model 32
2.7 Evolutionary Software Process Models 34
2.7.1 The Incremental Model 35
2.7.2 The Spiral Model 36
2.7.3 The WINWIN Spiral Model 38
2.7.4 The Concurrent Development Model 40
2.8 Component-Based Development 42
2.9 The Formal Methods Model 43
2.10 Fourth Generation Techniques 44
2.11 Process Technology 46
2.12 Product and Process 46
2.13 Summary 47
REFERENCES 47
PROBLEMS AND POINTS TO PONDER 49
FURTHER READINGS AND INFORMATION SOURCES 50
TABLE OF CONTENTS
PART TWO—MANAGING SOFTWARE PROJECTS 53
CHAPTER 3 PROJECT MANAGEMENT CONCEPTS 55
3.1 The Management Spectrum 56
3.1.1 The People 56
3.1.2 The Product 57
3.1.2 The Process 57
3.1.3 The Project 57
3.2 People 58
3.2.1 The Players 58
3.2.2 Team Leaders 59
3.2.3 The Software Team 60
3.2.4 Coordination and Communication Issues 65
3.3 The Product 67
3.3.1 Software Scope 67
3.3.2 Problem Decomposition 67
3.4 The Process 68
3.4.1 Melding the Product and the Process 69
3.4.2 Process Decomposition 70
3.5 The Project 71
3.6 The W5HH Principle 73
3.7 Critical Practices 74
3.8 Summary 74
REFERENCES 75
PROBLEMS AND POINTS TO PONDER 76
FURTHER READINGS AND INFORMATION SOURCES 77

CHAPTER 4 SOFTWARE PROCESS AND PROJECT METRICS 79


4.1 Measures, Metrics, and Indicators 80
4.2 Metrics in the Process and Project Domains 81
4.2.1 Process Metrics and Software Process Improvement 82
4.2.2 Project Metrics 86
4.3 Software Measurement 87
4.3.1 Size-Oriented Metrics 88
4.3.2 Function-Oriented Metrics 89
4.3.3 Extended Function Point Metrics 91
4.4 Reconciling Different Metrics Approaches 94
4.5 Metrics for Software Quality 95
4.5.1 An Overview of Factors That Affect Quality 95
4.5.2 Measuring Quality 96
4.5.3 Defect Removal Efficiency 98
4.6 Integrating Metrics Within the Software Engineering Process 98
4.6.1 Arguments for Software Metrics 99
4.6.2 Establishing a Baseline 100
4.6.3 Metrics Collection, Computation, and Evaluation 100
4.7 Managing Variation: Statistical Quality Control 100
4.8 Metrics for Small Organizations 104
4.9 Establishing a Software Metrics Program 105
4.10 Summary 107
REFERENCES 107
PROBLEMS AND POINTS TO PONDER 109
FURTHER READINGS AND INFORMATION SOURCES 110

CHAPTER 5 SOFTWARE PROJECT PLANNING 113


5.1 Observations on Estimating 114
5.2 Project Planning Objectives 115
5.3 Software Scope 115
5.3.1 Obtaining Information Necessary for Scope 116
5.3.2 Feasibility 117
5.3.3 A Scoping Example 118
5.4 Resources 120
5.4.1 Human Resources 121
5.4.2 Reusable Software Resources 121
5.4.3 Environmental Resources 122
5.5 Software Project Estimation 123
5.6 Decomposition Techniques 124
5.6.1 Software Sizing 124
5.6.2 Problem-Based Estimation 126
5.6.3 An Example of LOC-Based Estimation 128
5.6.4 An Example of FP-Based Estimation 129
5.6.4 Process-Based Estimation 130
5.6.5 An Example of Process-Based Estimation 131
5.7 Empirical Estimation Models 132
5.7.1 The Structure of Estimation Models 132
5.7.2 The COCOMO Model 133
5.7.3 The Software Equation 135
5.8 The Make/Buy Decision 136
5.8.1 Creating a Decision Tree 137
5.8.2 Outsourcing 138
5.9 Automated Estimation Tools 139
5.10 Summary 140
REFERENCES 140
PROBLEMS AND POINTS TO PONDER 141
FURTHER READINGS AND INFORMATION SOURCES 142

CHAPTER 6 RISK ANALYSIS AND MANAGEMENT 145


6.1 Reactive versus Proactive Risk Strategies 146
6.2 Software Risks 146
6.3 Risk Identification 148
6.3.1 Assessing Overall Project Risk 149
6.3.2 Risk Components and Drivers 149
6.4 Risk Projection 151
6.4.1 Developing a Risk Table 151
6.4.2 Assessing Risk Impact 153
6.4.3 Risk Assessment 154
6.5 Risk Refinement 156
6.6 Risk Mitigation, Monitoring, and Management 156
6.7 Safety Risks and Hazards 158
6.8 The RMMM Plan 159
6.9 Summary 159
REFERENCES 160
PROBLEMS AND POINTS TO PONDER 161
FURTHER READINGS AND INFORMATION SOURCES 162

CHAPTER 7 PROJECT SCHEDULING AND TRACKING 165


7.1 Basic Concepts 166
7.1.1 Comments on “Lateness” 167
7.1.2 Basic Principles 168
7.2 The Relationship Between People and Effort 170
7.2.1 An Example 170
7.2.2 An Empirical Relationship 171
7.2.3 Effort Distribution 172
7.3 Defining a Task Set for the Software Project 172
7.3.1 Degree of Rigor 173
7.3.2 Defining Adaptation Criteria 174
7.3.3 Computing a Task Set Selector Value 175
7.3.4 Interpreting the TSS Value and Selecting the Task Set 176
7.4 Selecting Software Engineering Tasks 177
7.5 Refinement of Major Tasks 178
7.6 Defining a Task Network 180
7.7 Scheduling 181
7.7.1 Timeline Charts 182
7.7.2 Tracking the Schedule 185
7.8 Earned Value Analysis 186
7.9 Error Tracking 187
7.10 The Project Plan 189
7.11 Summary 189
REFERENCES 189
PROBLEMS AND POINTS TO PONDER 190
FURTHER READINGS AND INFORMATION SOURCES 192

CHAPTER 8 SOFTWARE QUALITY ASSURANCE 193


8.1 Quality Concepts 194
8.1.1 Quality 195
8.1.2 Quality Control 196
8.1.3 Quality Assurance 196
8.1.4 Cost of Quality 196
8.2 The Quality Movement 198
8.3 Software Quality Assurance 199
8.3.1 Background Issues 200
8.3.2 SQA Activities 201
8.4 Software Reviews 202
8.4.1 Cost Impact of Software Defects 203
8.4.2 Defect Amplification and Removal 204
8.5 Formal Technical Reviews 205
8.5.1 The Review Meeting 206
8.5.2 Review Reporting and Record Keeping 207
8.5.3 Review Guidelines 207
8.6 Formal Approaches to SQA 209
8.7 Statistical Software Quality Assurance 209
8.8 Software Reliability 212
8.8.1 Measures of Reliability and Availability 212
8.8.2 Software Safety 213
8.9 Mistake-Proofing for Software 214
8.10 The ISO 9000 Quality Standards 216
8.10.1 The ISO Approach to Quality Assurance Systems 217
8.10.2 The ISO 9001 Standard 217
8.11 The SQA Plan 218
8.12 Summary 219
REFERENCES 220
PROBLEMS AND POINTS TO PONDER 221
FURTHER READINGS AND INFORMATION SOURCES 222

CHAPTER 9 SOFTWARE CONFIGURATION MANAGEMENT 225


9.1 Software Configuration Management 226
9.1.1 Baselines 227
9.1.2 Software Configuration Items 228
9.2 The SCM Process 230
9.3 Identification of Objects in the Software Configuration 230
9.4 Version Control 232
9.5 Change Control 234
9.6 Configuration Audit 237
9.7 Status Reporting 237
9.8 SCM Standards 238
9.9 Summary 238
REFERENCES 239
PROBLEMS AND POINTS TO PONDER 239
FURTHER READINGS AND INFORMATION SOURCES 240

PART THREE—CONVENTIONAL METHODS FOR SOFTWARE ENGINEERING 243

CHAPTER 10 SYSTEM ENGINEERING 245


10.1 Computer-Based Systems 246
10.2 The System Engineering Hierarchy 248
10.2.1 System Modeling 249
10.2.2 System Simulation 251
10.3 Business Process Engineering: An Overview 251
10.4 Product Engineering: An Overview 254
10.5 Requirements Engineering 256
10.5.1 Requirements Elicitation 256
10.5.2 Requirements Analysis and Negotiation 258
10.5.3 Requirements Specification 259
10.5.4 System Modeling 259
10.5.5 Requirements Validation 260
10.5.6 Requirements Management 261
10.6 System Modeling 262
10.7 Summary 265
REFERENCES 267
PROBLEMS AND POINTS TO PONDER 267
FURTHER READINGS AND INFORMATION SOURCES 269

CHAPTER 11 ANALYSIS CONCEPTS AND PRINCIPLES 271


11.1 Requirements Analysis 272
11.2 Requirements Elicitation for Software 274
11.2.1 Initiating the Process 274
11.2.2 Facilitated Application Specification Techniques 275
11.2.3 Quality Function Deployment 279
11.2.4 Use-Cases 280
11.3 Analysis Principles 282
11.3.1 The Information Domain 283
11.3.2 Modeling 285
11.3.3 Partitioning 286
11.3.4 Essential and Implementation Views 288
11.4 Software Prototyping 289
11.4.1 Selecting the Prototyping Approach 289
11.4.2 Prototyping Methods and Tools 290
11.5 Specification 291
11.5.1 Specification Principles 291
11.5.2 Representation 292
11.5.3 The Software Requirements Specification 293
11.6 Specification Review 294
11.7 Summary 294
REFERENCES 295
PROBLEMS AND POINTS TO PONDER 296
FURTHER READINGS AND INFORMATION SOURCES 297

CHAPTER 12 ANALYSIS MODELING 299


12.1 A Brief History 300
12.2 The Elements of the Analysis Model 301
12.3 Data Modeling 302
12.3.1 Data Objects, Attributes, and Relationships 302
12.3.2 Cardinality and Modality 305
12.3.3 Entity/Relationship Diagrams 307
12.4 Functional Modeling and Information Flow 309
12.4.1 Data Flow Diagrams 311
12.4.2 Extensions for Real-Time Systems 312
12.4.3 Ward and Mellor Extensions 312
12.4.4 Hatley and Pirbhai Extensions 315
12.5 Behavioral Modeling 317
12.6 The Mechanics of Structured Analysis 319
12.6.1 Creating an Entity/Relationship Diagram 319
12.6.2 Creating a Data Flow Model 321
12.6.3 Creating a Control Flow Model 324
12.6.4 The Control Specification 325
12.6.5 The Process Specification 327
12.7 The Data Dictionary 328
12.8 Other Classical Analysis Methods 330
12.9 Summary 331
REFERENCES 331
PROBLEMS AND POINTS TO PONDER 332
FURTHER READINGS AND INFORMATION SOURCES 334

CHAPTER 13 DESIGN CONCEPTS AND PRINCIPLES 335


13.1 Software Design and Software Engineering 336
13.2 The Design Process 338
13.2.1 Design and Software Quality 338
13.2.2 The Evolution of Software Design 339
13.3 Design Principles 340
13.4 Design Concepts 341
13.4.1 Abstraction 342
13.4.2 Refinement 343
13.4.3 Modularity 343
13.4.4 Software Architecture 346
13.4.5 Control Hierarchy 347
13.4.6 Structural Partitioning 348
13.4.7 Data Structure 349
13.4.8 Software Procedure 351
13.4.9 Information Hiding 351
13.5 Effective Modular Design 352
13.5.1 Functional Independence 352
13.5.2 Cohesion 353
13.5.3 Coupling 354
13.6 Design Heuristics for Effective Modularity 355
13.7 The Design Model 357
13.8 Design Documentation 358
13.9 Summary 359
REFERENCES 359
PROBLEMS AND POINTS TO PONDER 361
FURTHER READINGS AND INFORMATION SOURCES 362

CHAPTER 14 ARCHITECTURAL DESIGN 365


14.1 Software Architecture 366
14.1.1 What Is Architecture? 366
14.1.2 Why Is Architecture Important? 367
14.2 Data Design 368
14.2.1 Data Modeling, Data Structures, Databases, and the Data Warehouse 368
14.2.2 Data Design at the Component Level 369
14.3 Architectural Styles 371
14.3.1 A Brief Taxonomy of Styles and Patterns 371
14.3.2 Organization and Refinement 374
14.4 Analyzing Alternative Architectural Designs 375
14.4.1 An Architecture Trade-off Analysis Method 375
14.4.2 Quantitative Guidance for Architectural Design 376
14.4.3 Architectural Complexity 378
14.5 Mapping Requirements into a Software Architecture 378
14.5.1 Transform Flow 379
14.5.2 Transaction Flow 380
14.6 Transform Mapping 380
14.6.1 An Example 380
14.6.2 Design Steps 381
14.7 Transaction Mapping 389
14.7.1 An Example 390
14.7.2 Design Steps 390
14.8 Refining the Architectural Design 394
14.9 Summary 395
REFERENCES 396
PROBLEMS AND POINTS TO PONDER 397
FURTHER READINGS AND INFORMATION SOURCES 399

CHAPTER 15 USER INTERFACE DESIGN 401


15.1 The Golden Rules 402
15.1.1 Place the User in Control 402
15.1.2 Reduce the User’s Memory Load 404
15.1.3 Make the Interface Consistent 404
15.2 User Interface Design 405
15.2.1 Interface Design Models 405
15.2.2 The User Interface Design Process 407
15.3 Task Analysis and Modeling 408
15.4 Interface Design Activities 410
15.4.1 Defining Interface Objects and Actions 410
15.4.2 Design Issues 413
15.5 Implementation Tools 415
15.6 Design Evaluation 416
15.7 Summary 418
REFERENCES 418
PROBLEMS AND POINTS TO PONDER 419
FURTHER READINGS AND INFORMATION SOURCES 420

CHAPTER 16 COMPONENT-LEVEL DESIGN 423


16.1 Structured Programming 424
16.1.1 Graphical Design Notation 425
16.1.2 Tabular Design Notation 427
16.1.3 Program Design Language 429
16.1.4 A PDL Example 430
16.2 Comparison of Design Notation 432
16.3 Summary 433
REFERENCES 433
PROBLEMS AND POINTS TO PONDER 434
FURTHER READINGS AND INFORMATION SOURCES 435

CHAPTER 17 SOFTWARE TESTING TECHNIQUES 437


17.1 Software Testing Fundamentals 438
17.1.1 Testing Objectives 439
17.1.2 Testing Principles 439
17.1.3 Testability 440
17.2 Test Case Design 443
17.3 White-Box Testing 444
17.4 Basis Path Testing 445
17.4.1 Flow Graph Notation 445
17.4.2 Cyclomatic Complexity 446
17.4.3 Deriving Test Cases 449
17.4.4 Graph Matrices 452
17.5 Control Structure Testing 454
17.5.1 Condition Testing 454
17.5.2 Data Flow Testing 456
17.5.3 Loop Testing 458
17.6 Black-Box Testing 459
17.6.1 Graph-Based Testing Methods 460
17.6.2 Equivalence Partitioning 463
17.6.3 Boundary Value Analysis 465
17.6.4 Comparison Testing 465
17.6.5 Orthogonal Array Testing 466
17.7 Testing for Specialized Environments, Architectures, and Applications 468
17.7.1 Testing GUIs 469
17.7.2 Testing of Client/Server Architectures 469
17.7.3 Testing Documentation and Help Facilities 469
17.7.4 Testing for Real-Time Systems 470
17.8 Summary 472
REFERENCES 473
PROBLEMS AND POINTS TO PONDER 474
FURTHER READINGS AND INFORMATION SOURCES 475

CHAPTER 18 SOFTWARE TESTING STRATEGIES 477


18.1 A Strategic Approach to Software Testing 478
18.1.1 Verification and Validation 479
18.1.2 Organizing for Software Testing 479
18.1.3 A Software Testing Strategy 480
18.1.4 Criteria for Completion of Testing 482
18.2 Strategic Issues 484
18.3 Unit Testing 485
18.3.1 Unit Test Considerations 485
18.3.2 Unit Test Procedures 487
18.4 Integration Testing 488
18.4.1 Top-down Integration 488
18.4.2 Bottom-up Integration 490
18.4.3 Regression Testing 491
18.4.4 Smoke Testing 492
18.4.5 Comments on Integration Testing 493
18.4.6 Integration Test Documentation 494
18.5 Validation Testing 495
18.5.1 Validation Test Criteria 495
18.5.2 Configuration Review 496
18.5.3 Alpha and Beta Testing 496
18.6 System Testing 496
18.6.1 Recovery Testing 497
18.6.2 Security Testing 497
18.6.3 Stress Testing 498
18.6.4 Performance Testing 498
18.7 The Art of Debugging 499
18.7.1 The Debugging Process 499
18.7.2 Psychological Considerations 500
18.7.3 Debugging Approaches 501
18.8 Summary 502
REFERENCES 503
PROBLEMS AND POINTS TO PONDER 504
FURTHER READINGS AND INFORMATION SOURCES 505

CHAPTER 19 TECHNICAL METRICS FOR SOFTWARE 507


19.1 Software Quality 508
19.1.1 McCall’s Quality Factors 509
19.1.2 FURPS 511
19.1.3 ISO 9126 Quality Factors 513
19.1.4 The Transition to a Quantitative View 513
19.2 A Framework for Technical Software Metrics 514
19.2.1 The Challenge of Technical Metrics 514
19.2.2 Measurement Principles 515
19.2.3 The Attributes of Effective Software Metrics 516
19.3 Metrics for the Analysis Model 517
19.3.1 Function-Based Metrics 518
19.3.2 The Bang Metric 520
19.3.3 Metrics for Specification Quality 522
19.4 Metrics for the Design Model 523
19.4.1 Architectural Design Metrics 523
19.4.2 Component-Level Design Metrics 526
19.4.3 Interface Design Metrics 530
19.5 Metrics for Source Code 531
19.6 Metrics for Testing 532
19.7 Metrics for Maintenance 533
19.8 Summary 534
REFERENCES 534
PROBLEMS AND POINTS TO PONDER 536
FURTHER READING AND OTHER INFORMATION SOURCES 537

Anda mungkin juga menyukai