Download - CHAPTER 5 — Unit B
![Page 1: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/1.jpg)
Slide 5B.1
© The McGraw-Hill Companies, 2005
Object-Oriented and Classical Software
Engineering
Sixth Edition, WCB/McGraw-Hill, 2005
Stephen R. [email protected]
![Page 2: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/2.jpg)
Slide 5B.2
© The McGraw-Hill Companies, 2005
CHAPTER 5 — Unit B
THE TOOLS OF THE TRADE
![Page 3: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/3.jpg)
Slide 5B.3
© The McGraw-Hill Companies, 2005
Continued from Unit 5A
![Page 4: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/4.jpg)
Slide 5B.4
© The McGraw-Hill Companies, 2005
5.2 Cost–Benefit Analysis
Compare costs and future benefitsEstimate costsEstimate benefitsState all assumptions explicitly
![Page 5: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/5.jpg)
Slide 5B.5
© The McGraw-Hill Companies, 2005
Cost–Benefit Analysis (contd)
Example: Computerizing KCEC
Figure 5.8
![Page 6: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/6.jpg)
Slide 5B.6
© The McGraw-Hill Companies, 2005
Cost–Benefit Analysis (contd)
Tangible costs/benefits are easy to measure
Make assumptions to estimate intangible costs/benefits Improving the assumptions will improve the estimates
![Page 7: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/7.jpg)
Slide 5B.7
© The McGraw-Hill Companies, 2005
5.3 Software Metrics
To detect problems early, it is essential to measure
Examples:LOC per monthDefects per 1000 lines of code
![Page 8: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/8.jpg)
Slide 5B.8
© The McGraw-Hill Companies, 2005
Different Types of Metrics
Product metrics Examples:
Size of product Reliability of product
Process metricsExample:
Efficiency of fault detection during development
Metrics specific to a given workflowExample:
Number of defects detected per hour in specification reviews
![Page 9: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/9.jpg)
Slide 5B.9
© The McGraw-Hill Companies, 2005
The Five Basic Metrics
Size In lines of code, or better
Cost In dollars
Duration In months
Effort In person months
QualityNumber of faults detected
![Page 10: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/10.jpg)
Slide 5B.10
© The McGraw-Hill Companies, 2005
5.4 CASE (Computer-Aided Software Engineering)
Scope of CASECASE can support the entire life-cycle
The computer assists with drudge work It manages all the details
![Page 11: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/11.jpg)
Slide 5B.11
© The McGraw-Hill Companies, 2005
5.5 Taxonomy of CASE
UpperCASE (front-end tool)versus
LowerCASE (back-end tool)
![Page 12: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/12.jpg)
Slide 5B.12
© The McGraw-Hill Companies, 2005
Some Useful Tools
Data dictionaryComputerized list of all data defined within the product
Consistency checker
Report generator, screen generator
![Page 13: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/13.jpg)
Slide 5B.13
© The McGraw-Hill Companies, 2005
Taxonomy of CASE (contd)
(a) Tool versus (b) workbench versus (c) environmentFigure 5.9
![Page 14: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/14.jpg)
Slide 5B.14
© The McGraw-Hill Companies, 2005
5.6 Scope of CASE
Programmers need to have:Accurate, up-to-date versions of all project documentsOnline help information regarding the
Operating system Editor Programming language
Online programming standardsOnline manuals
Editor manuals Programming manuals
![Page 15: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/15.jpg)
Slide 5B.15
© The McGraw-Hill Companies, 2005
Scope of CASE (contd)
Programmers need to have:E-mail systemsSpreadsheetsWord processorsStructure editors Pretty printersOnline interface checkers
![Page 16: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/16.jpg)
Slide 5B.16
© The McGraw-Hill Companies, 2005
Online Interface Checker
A structure editor must support online interface checking The editor must know the name of every procedure
Interface checking is an important part of programming-in-the-large
![Page 17: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/17.jpg)
Slide 5B.17
© The McGraw-Hill Companies, 2005
Online Interface Checker (contd)
ExampleThe user enters the call
average = dataArray.computeAverage (numberOfValues);
The editor immediately responds Method computeAverage not known
The programmer is given two choicesCorrect the name of the method to computeMean Declare new procedure computeAverage and specify its
parameters
This enables full interface checking
![Page 18: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/18.jpg)
Slide 5B.18
© The McGraw-Hill Companies, 2005
Online Interface Checker (contd)
ExampleDeclaration of q is
void q (float floatVar, int intVar, String s1, String s2);
Call (invocation) isq (intVar, floatVar, s1, s2);
The online interface checker detects the fault
Help facilityOnline information for the parameters of method q Better: Editor generates a template for the call
The template shows type of each parameter The programmer replaces formal by actual parameters
![Page 19: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/19.jpg)
Slide 5B.19
© The McGraw-Hill Companies, 2005
Online Interface Checker (contd)
AdvantagesThere is no need for different tools with different interfacesHard-to-detect faults are immediately flagged for correction
Wrong number of parameters Parameters of the wrong type
Essential when software is produced by a team If one programmer changes an interface specification, all
components calling that changed artifact must be disabled
![Page 20: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/20.jpg)
Slide 5B.20
© The McGraw-Hill Companies, 2005
Online Interface Checker (contd)
Even when a structure editor incorporates an online interface checker, a problem remainsThe programmer still has to exit from the editor to
invoke the compiler (to generate code)Then, the linker must be called to link the productThe programmer must adjust to the JCL, compiler, and
linker output
Solution: Incorporate an operating system front-end into the structure editor
![Page 21: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/21.jpg)
Slide 5B.21
© The McGraw-Hill Companies, 2005
Operating System Front-End in Editor
Single command go or run Use of the mouse to choose
An icon, or A menu selection
This one command causes the editor to invoke the compiler, linker, loader, and execute the product
![Page 22: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/22.jpg)
Slide 5B.22
© The McGraw-Hill Companies, 2005
Source Level Debugger
Example: Product executes terminates abruptly and prints
Overflow at 4B06
or
Core dumped
or Segmentation fault
![Page 23: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/23.jpg)
Slide 5B.23
© The McGraw-Hill Companies, 2005
Source Level Debugger (contd)
The programmer works in a high-level language, but must examineMachine code core dumpsAssembler listingsLinker listingsSimilar low-level documentation
This destroys the advantage of programming in a high-level language
We needAn interactive source level debugger (like dbx)
![Page 24: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/24.jpg)
Slide 5B.24
© The McGraw-Hill Companies, 2005
Source Level Debugger (contd)
Output from a typical source-level debugger
Figure 5.10
![Page 25: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/25.jpg)
Slide 5B.25
© The McGraw-Hill Companies, 2005
Programming Workbench
Structure editor with Online interface checking capabilitiesOperating system front-endOnline documentationSource level debugger
This constitutes a simple programming environment
![Page 26: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/26.jpg)
Slide 5B.26
© The McGraw-Hill Companies, 2005
Programming Workbench (contd)
This is by no means newAll the above features are supported by FLOW (1980)The technology has been in place for years
Surprisingly, some programmers still implement code the old-fashioned way
![Page 27: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/27.jpg)
Slide 5B.27
© The McGraw-Hill Companies, 2005
5.7 Software Versions
During maintenance, at all times there are at least two versions of the product:The old version, and The new version
There are two types of versions: revisions and variations
![Page 28: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/28.jpg)
Slide 5B.28
© The McGraw-Hill Companies, 2005
5.7.1 Revisions
RevisionA version to fix a fault in the artifactWe cannot throw away an incorrect version
The new version may be no better Some sites may not install the new version
Perfective and adaptive maintenance also result in revisions
![Page 29: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/29.jpg)
Slide 5B.29
© The McGraw-Hill Companies, 2005
5.7.2 Variations
A variation is a version for a different operating system–hardware
Variations are designed to coexist in parallel
Figure 5.11
![Page 30: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/30.jpg)
Slide 5B.30
© The McGraw-Hill Companies, 2005
5.8 Configuration Control
Every code artifact exists in three formsSource codeObject codeExecutable load
image
ConfigurationA version of each
artifact from which a given version of a product is built
Figure 5.12
![Page 31: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/31.jpg)
Slide 5B.31
© The McGraw-Hill Companies, 2005
Version-Control Tool
Essential for programming-in-the-manyA first step toward configuration management
A version-control tool must handleUpdatesParallel versions
![Page 32: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/32.jpg)
Slide 5B.32
© The McGraw-Hill Companies, 2005
Version-Control Tool (contd)
Notation for file name, variation, and version
Figure 5.13
![Page 33: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/33.jpg)
Slide 5B.33
© The McGraw-Hill Companies, 2005
Version-Control Tool (contd)
Problem of multiple variationsDeltas
Version control is not enough — maintenance issues
![Page 34: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/34.jpg)
Slide 5B.34
© The McGraw-Hill Companies, 2005
5.8.1 Configuration Control during Postdelivery Maintenance
Two programmers are working on the same artifact mDual/16
The changes of the first programmer are contained in mDual/17
The changes of the second programmer are contained in mDual/18The changes of the first programmer are lost
![Page 35: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/35.jpg)
Slide 5B.35
© The McGraw-Hill Companies, 2005
5.8.2 Baselines
The maintenance manager must set upBaselinesPrivate workspaces
When an artifact is to be changed, the current version is frozenThereafter, it can never be changed
![Page 36: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/36.jpg)
Slide 5B.36
© The McGraw-Hill Companies, 2005
Baselines (contd)
Both programmers make their changes to mDual/16
The first programmer Freezes mDual/16 and makes changes to itThe resulting revision is mDual/17 After testing, mDual/17 becomes the new baseline
The second programmer Freezes mDual/17 and makes changes to itThe resulting revision is mDual/18 After testing, mDual/18 becomes the new baseline
![Page 37: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/37.jpg)
Slide 5B.37
© The McGraw-Hill Companies, 2005
5.8.3 Configuration Control during Development
While an artifact is being codedThe programmer performs informal testing
Then the artifact is given to the SQA group for methodical testingChanges from now on can impact the product
An artifact must be subject to configuration control from the time it is passed by SQA
![Page 38: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/38.jpg)
Slide 5B.38
© The McGraw-Hill Companies, 2005
Configuration-Control Tools
UNIX version-control toolssccs rcscvs
Popular commercial configuration-control toolsPVCSSourceSafe
Open-source configuration-control toolcvs
![Page 39: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/39.jpg)
Slide 5B.39
© The McGraw-Hill Companies, 2005
5.9 Build Tools
ExampleUNIX make
A build tool compares the date and time stamp onSource code, object code It calls the appropriate compiler only if necessary
The tool then compares the date and time stamp onObject code, executable load image It calls the linker only if necessary
![Page 40: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/40.jpg)
Slide 5B.40
© The McGraw-Hill Companies, 2005
5.10 Productivity Gains with CASE Tools
Survey of 45 companies in 10 industries (1992)Half information systemsQuarter scientific software Quarter real-time aerospace software
ResultsAbout 10 percent annual productivity gainsCost: $125,000 per seat
![Page 41: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/41.jpg)
Slide 5B.41
© The McGraw-Hill Companies, 2005
Productivity Gains with CASE Tools (contd)
Justifications for CASEFaster developmentFewer faultsEasier maintenance Improved morale
![Page 42: CHAPTER 5 — Unit B](https://reader035.vdocument.in/reader035/viewer/2022062422/56814082550346895dac0800/html5/thumbnails/42.jpg)
Slide 5B.42
© The McGraw-Hill Companies, 2005
5.10 Productivity Gains with CASE Tools
Newer results on 15 Fortune 500 companies (1997)
It is vital to haveTraining, andA software process
Results confirm that CASE environments should be used at CMM level 3 or higher
“A fool with a tool is still a fool”