software engineering - kopykitab...software engineering & testing n. ~ an introduction b. b....

16

Upload: others

Post on 10-Aug-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)
Page 2: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

SOFTWARE ENGINEERING & TESTING

n. ~

An Introduction

B. B. AGARWAL

S. P. TAYAL

M. GUPTA

FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

JONES AND BARTLETI PUBLISHERS BANGALORE • CHENNAI • COCHIN e GUWAHATI e HYDERABAD Sudbury, Massachusetts JALANDHAR • KOLKATA • LUCKNOW e MUMBAI e RANCH I

BOSTON TORONTO LONDON SINGAPORE NEW DELHI

Page 3: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

Published by : FIREWAL MEDIA

(An Imprint of Laxmi Publications Pvt. Ltd.) 113, Golden House, Daryaganj ,

New Delhi-110002

Phone : 011-43 53 25 00 Fax : 011-43 53 25 28

www .laxmipublications.com [email protected]

Original Copyright ©2011 by LAxMI PUBLICATIONS PvT. LTD. All rights reserved. International Edition Reprint & Revision Copyright© 2011 by JONES AND BARTLETT PuBLISHERS, LLC. All rights reserved. Indian Reprint Copyright© 2011 of International Edition by Firewal Media (An Imprint of Laxmi Publications Pvt. Ltd.). All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher.

This economy edition is for sale in India only.

Economy Edition Price : Edition : 2011

OFFICES

(() Bangalore 080-26 75 69 30

(() Cochin 0484-237 70 04, 405 13 03 (() Hyderabad 040-24 65 23 33

({) Kolkata 033-22 27 43 84

({) Mumbai 022-24 91 54 15, 24 92 78 69

({) Ranchi 0651-22147 64

FS0-3058-395-SOFTWARE ENGG & TESTING-AGA

(() Chennai 044-24 34 47 26

(() Guwahati 0361-251 36 69, 251 38 81 (() Jalandhar 0181-222 12 72

({) Lucknow 0522-220 99 16

({) Patna 0612-230 00 97

C-2090/010/09

Printed at : Printman (India), Delhi.

Page 4: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

TABLE OF CONTENTS

PART 1: SOFTWARE ENGINEERING AND TESTING

Chapter 1. Introduction to Software Er:-gineering

. 1.1 Introduction to Software

1.2 Types of Software

1.3 Classes of Software

1.4 Introduction to Software Engineering

1.5 Software Components

1.6 Software Characteristics

1.7 Software Crisis

1.8 Software Myths

1.9 Software Applications

1.10 Software-Engineering Processes

1.11 Evolution of Software

1.12 Comparison of Software Engineering and Related Fields

1.13 Some Terminologies

1.14· Programs Versus Software Products

Chapter 2. Software-Development Life-Cycle Models

2.1 Software-Development Life-Cycle

2.2 Waterfall Model

2.3 Prototyping Model

2.4 Spiral Model

. 2.5 Evolutionary Development Model

2.6 ·Iterative-Enhancement Model

2.7 RAD Model )

2.8 Comparison of Various Process Models

3

3

5

8

9

11

12

13

15

15

18

20

22

25

26

29

29

36

41

44

46

47

49

50

v

Page 5: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

VI TABLE OF CONTENTS

Chapter 3. Introduction to Software Requirements Specification

3.1 Requirement Engineering

. 3.2 Process of Requirements Engineering

3.3 Information Modeling

3.4 Data-Flow Diagrams

3.5 Decision Tables

3.6 SRS Document

3.7 IEEE Standards for SRS Documents

3.8 SRS Validation

3.9 Components of SRS

3.10 Characteristics of SRS

3.11 Entity-Relationship Diagram

Chapter 4. Software Reliability and Quality Assurance

4.1 Verification and Validation

4.2 Software Quality Assurance

4.3 Software Quality

4.4 Capability Maturity Model (SEI-CMM)

4.5 International Standard Organization (ISO)

4.6 Comparison of IS0-9000 Certification and the SEI-CMM

4.7 Reliability Issues

4.8 Reliability Metrics

4.9 Reliability Growth Modeling

4.10 Reliability Assessment

Chapter 5. System Design

5.1 System/Software Design

5.2 Architectural Design

5.3 Low-Level Design

5.4 Coupling and Cohesio'n

5.5 Functional-Oriented Versus The Object-Oriented Approach

5.6 Design Specifications

5.7 Verification for Design

5.8 Monitoring and Control for Design

53

53

55

61

62

67

70

73

75

75

78

79

85

85

.87

89

96

99

106

107

110

112

115

117

117

123

125

136

143

144

145

146

Page 6: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

··•

Chapter 6. Software Meas urement and Metrics

6.1 Software Metrics

6.2 Halstead's Software Scien~e

6.3 Function-Point Based Measures

6.4 Cyclomatic Complexity

Chapter 7. Software Testing

7.1 Introduction to Testing

7.2 Testing Principles

7.3 Testing Objectives

7.4 Test Oracles

7.5 Levels of Testing

7.6 White-Box Testing/Structural Testing

7.7 Functional/Black-Box Testing

7.8 Test Plan

7.9 Test-Ca~e Design

Chapter 8. Software-Testing Strategies

•'

8.1 Static-Testing Strategies

8.2 Debugging

8.3 Error, Fault, and Failure

Chapter 9. Software Maintenance and Project Management

9.1 Software as an Evolution Entity

9.2 Software-Configuration Management Activities

9.3 Change-Control Process

9.4 Software-Version Control

9.5 Software-Configuration Management

9.6 Need for Maintenance

9.7 Categories of Maintenance

9.8 Maintenance Costs

9.9 Software-Project Estimation .

9.10 Constructive Cost Model (COCOMO)

9.11 Software-Risk Analysis and Management

TABLE oF CoNTENTS VII

149

149

151

154

157

161

161

162

163

164

165

173

175

178

179 '·

181

181

186

189

193

193

193

197

199

200

202

203

204

207

211

215

Page 7: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

VIII TABLE OF CoNTENTS

Chapter 10. Computer-Aided Software Engineering

10.1 Case and its Scope

10.2 Levels of Case

10.3 Architecture of Case Environment

10.4 Building Blocks for Case

10.5 Case Support in Software Life-Cycle

10.6 Objectives of Case

10.7 Case Repository

10.8 Characteristics of Case Tools

10.9 Case Classification

10.10 Categories of Case Tools

10.11 Advantages of Case Tools

10.12 Disadvantages of Case Tools

10.13 Reverse Software Engineering

10.14 Software Re-Engineering

Chapter 11. Coding

11.1 Information Hiding

11.2 Programming Style

11.3 Internal Documentation

11.4 Monitoring and Control for Coding

11.5 Structured Programming

11.6 Fourth-Generation Techniques

I PART II: SOFTWARE DEVELOPMENT AND APPLICATIONS I

Chapter 12. Introduction to Software Development

12.1 Program Phase

12.2 How tb Write a Good Program

12.3 Programming Tools

Chapter 13. Visual Basic 6.0

13.1 Hardware and Software Requirements for Visual Basic

13.2 Application Types

13.3 Compilation in Visual Basic

J

223

223

224

224

226

227

228

229

231

231

233

234

235

235

240

247

247

248

250

251

252

255

261

262

262

263

265

266

266

268

Page 8: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

13.4 Visual Basic Terminology

13.5 Integrated Development Environment (IDE)

Chapter 14. Controls in Visual Basic

14.1 Tool-Box Controls

Chapter 15. Variables and Operators in Visual Basic

15.1 Variable Naming Conventions

15.2 Variable Declaration

15.3 Scope of Yariables

15.4 Logical Operators

15.5 Logical Operators

15.6 If-Else Statement

15.7 Do While .... Statement

15.8 For Loop

15.9 With-End With Statement

Chapter 16. Functions in Visual Basic

Chapter 17. Introduction to Databases

17.1 Tables .

17.2 Structure of a Database

1Z3 Keys

1Z4 Data Integrity

Chapter 18. MS Access 2000

18.1 Creating a Database in MS Access 2000

18.2 Data Types

18.3 Field Properties

18.4 Saving the Table

18.5 Modifying the Table

18.p Importing the Table

Chapter 19. Oracle

19.1 Starting with Oracle 8

19.2 How to Create a New User

/

T ABLE OF CONTENTS IX

268

269

273

276

297

297

297

298

298

299

301

301

302

302

303

315

316

317

317

318

319

319

324

324

327

328

328

329

329

331

Page 9: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

X . TABLE OF CONTENTS

19.3 User Creation by Navigator

19.4 Data TYpes in Oracle

19.5 Syntax and Query in Oracle

19.6 Functions

19.7 Primary Keys

19.8 Data Export

19.9 Data Import

Chapte-: 20. SQL Server 2000

20.1 What's New in Microsoft SQL Server 2000?

20.2 Starting Microsoft SQL Server 2000

20.3 Installation of SQL Server 2000

20.4 Creating a Database

20.5 How to Create a Database Using Enterprise Manager

20.6 Create a Database Using the Create Database Wizard

in En~erprise Manager

20.7 Creating a New TalJ!e

20.8 Data Types . , .

20.9 Query An~lyzer

20.10 How to use Query Analyzer

20.11 Generating an SQL Script

20.12 How to use the Script

20.13 Attaching a Database

20.14 Detac:hing a Database

20.15 Copy Database Wizard

20.16 Importing and Exporting a Database

20.17 SQL Server Service Manager

Chapter 21. Programming in Visual Basic with MS Access 2000

21.1 Saving Projects and Forms

21.2 Database Designing

21.3 Use of App.Path

Chapter 22. Programming with Oracle and SQL Server 200~ ·

22.1 Table Creation

332

335

336

344

345

346

347

349

. 349

349

351

353

354

358

358

361

368

368

370

374

376

378

380

380

386

391

393

399

412

41~

413

Page 10: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

TABLE OF CONTENTS XI

22.2 Data Links 414 I

22.3 Working with the Project 418

22.4 Data Export at Runtime 420

22.5 Working in a Project with an SQL Server 2000 Database 420

Chapter 23. Graphs 421

Chapter 24. Data Reports 425

24.1 Data Report Creation 425

24.2 Data Environment and the Connection 425

24.3 Data Report Designing 430

24.4 Data Report Controls 433

24.5 Calling a Report 436

24.6 Retrieval of Selected Data in the Data Report 436

24.7 Index Number of Data Report Section 439

24.8 Grouping in Data Reports 440

Chapter 25. Crystal Reports 447

25.1 Advantages over Visual Basic Data Reports 448

25.2 Starting with Crystal Report 8.5 448

25.3 Creating Reports Using DSN of the SQL Server 2000 Database - 451

25.4 Creating Connection Using DSN 456

Chapter 26. Error Handling 465

26.1 Key Handling 465

26.2 Key Locking at Key Press Event 469

26.3 Other Error-Handling Methods 470

26.4 Some Common Errors 471

26.5 Precautions 479

Chapter 27. Creating the Setup Package 481

27.1 How to Create a Setup 4181

Index 493

Page 11: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)
Page 12: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

PART I

SOFTWARE ENGINEERING

AND TESTING

The role of software engineering cannot be neglected in the field of software development. The advent of computers introduced the need for software and the quality of software introduced the need for software engineering.

Software engineering has come a long way since 1968, when the term was first used at a NATO conference, and software itself has entered our lives in ways that few had anticipated, even a decade ago. So a firm grounding in software-engineering theory and practice is essential for understanding how to build good error-free software at an inexpensive price and with less time and for evaluating the risks and opportunities that software presents in our everyday lives.

1

Page 13: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)
Page 14: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

Chapter 1 INTRODUCTION TO

SOFTWARE ENGINEERING

1.1 INTRODUCTION TO SOFTWARE

. software is described by its capabilities. The capabilities relate to the functions it executes, the features it provides, and the facilities it offers. Software written for sales-order processing would have different functions to process different

types of sales orders from dilierent market segments. The features, 'for example, would be to handle multi-currency computing, updating of product, sales, and ta?C status~ in MIS reports and books of accounts. The facilities could be printing of sales orders, e-mails to customers, reports, and advice to the store departments to dispatch the goods. The facilities and features could be optional and bas~d on customer choices. ·

Software is developed keepmg in mind certain hardware and operating system considerations, known as the platform. Hence, software is described along with its capabilities and the platform specifications that are required to run it.

3

Page 15: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

4 SOFTWARE ENGINEERING AND TESTING

1.1.1 Definition of Software

Software is a set of instructions used to acquire inputs and to manipulate them to produce the desired output in terms of functions and performance as determined by the user of the software. It also includes a set of documents, such as the software manual, meant to help users understand the software system. Today's software is comprised of Source Code, Executables, Design Documents, Operations, and System Manuals and Installation and Implementation Manuals.

Softwar"' includes:

(i) Instructions (computer programs) that when executed provide desired functions and performance.

(ii) Data structures that enable the programs to adequately manipulate information.

(iii) Documents that describe the operation and use of the programs.

OR

The term software refers to the set of computer programs, procedures, and associated documents (flowcharts, mqnuals, etc.) that describe the programs and how they are to be used. To be precise, software is a collection of programs whose objective is to enhance the capabilities of the hardware.

OR

Definition of software given by the IEEE:

Software is the collection of computer programs, procedure rules and associated documentation and data.

1.1.2 Importance of Software

Computer software has become a driving force.

• It is the engine that drives business decisionmaking.

• <It serves as the basis for modem scientific investigation and engineering problem-solving.

• It is embedded in all kinds of systems, such as transportation, medical, tele­communications, milit<;1ry, industrial processes, entertainment, office products, etc.

It is important as it affects nearly every aspect of our lives and has become pervasive in our commerce, our culture, and our everyday activities. Sof~are's impact on our society and cultUre is significant. As software importance grows, the software comn;mnity continually attempts to develop t~chnologies that will make it easier, faster, and less expensive to build high-qqality computer prog~ams.

Page 16: SOFTWARE ENGINEERING - Kopykitab...SOFTWARE ENGINEERING & TESTING n. ~ An Introduction B. B. AGARWAL S. P. TAYAL M. GUPTA FIREWAL MEDIA (An Imprint of Laxmi Publications Pvt. Ltd.)

Software Engineering And Testing

Publisher : Laxmi Publications ISBN : 9789380298412 Author : S P Tayal

Type the URL : http://www.kopykitab.com/product/11681

Get this eBook

40%OFF