Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach [email protected] 14OverviewOverview (contd)Implementation PhaseChoice of Programming Language (contd)Slide 7Slide 8Slide 9Fourth Generation LanguagesFourth Generation Languages (contd)Slide 12Productivity Increases with a 4GL?Actual Experiences with 4GLsActual Experiences with 4GLs (contd)Slide 16Key Factors When Using a 4GLKey Factors When Using a 4GL (contd)Good Programming PracticeGood Programming Practice ExampleGood Programming Practice (contd)Slide 22Prologue CommentsOther CommentsNested if StatementsNested if Statements (contd)Slide 27Slide 28Slide 29Programming StandardsRemarks on Programming StandardsRemarks on Programming Standards (contd)Slide 33Software Quality ControlModule ReuseModule Test Case SelectionModule Test Case Selection (contd)Feasibility of Testing to SpecificationsSlide 39Feasibility of Testing to CodeFeasibility of Testing to Code (contd)Slide 42Slide 43Slide 44Coping with the Combinatorial ExplosionSlide 46Black-Box Module Testing MethodsEquivalence Testing (contd)Boundary Value AnalysisDatabase ExampleBoundary Value Analysis of Output SpecsOverall StrategyGlass-Box Module Testing MethodsStructural Testing: Statement CoverageStructural Testing: Branch CoverageLinear Code SequencesAll-definition-use-path CoverageAll-definition-use-path Coverage (contd)Infeasible CodeMeasures of ComplexityLines of CodeOther Measures of ComplexitySoftware Science MetricsProblem with These MetricsCode Walkthroughs and InspectionsComparison: Module Testing TechniquesComparison: Module Testing Techniques (contd)Slide 68CleanroomCleanroom (contd)Slide 71Slide 72Testing ObjectsTesting Objects (contd)Slide 75Slide 76Slide 77Slide 78Slide 79Module Testing: Management ImplicationsWhen to Rewrite Rather Than DebugFault Distribution In Modules Is Not UniformFault Distribution In Modules Not Uniform (contd)Air Gourmet Case Study: Black-Box Test CasesChallenges of the Implementation PhaseSlide 14.1© The McGraw-Hill Companies, 2002Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002Stephen R. [email protected] 14.2© The McGraw-Hill Companies, 2002CHAPTER 14IMPLEMENTATION PHASESlide 14.3© The McGraw-Hill Companies, 2002OverviewChoice of programming languageFourth generation languagesGood programming practiceCoding standardsModule reuseModule test case selectionBlack-box module-testing techniquesGlass-box module-testing techniquesSlide 14.4© The McGraw-Hill Companies, 2002Overview (contd)Code walkthroughs and inspectionsComparison of module-testing techniquesCleanroomPotential problems when testing objectsManagement aspects of module testingWhen to rewrite rather than debug a moduleCASE tools for the implementation phaseAir Gourmet Case Study: Black-box test casesChallenges of the implementation phaseSlide 14.5© The McGraw-Hill Companies, 2002Implementation PhaseProgramming-in-the-manyChoice of Programming Language –Language is usually specified in contractBut what if the contract specifies –The product is to be implemented in the “most suitable” programming languageWhat language should be chosen?Slide 14.6© The McGraw-Hill Companies, 2002Choice of Programming Language (contd)Example –QQQ Corporation has been writing COBOL programs for over 25 years–Over 200 software staff, all with COBOL expertise–What is “most suitable” programming language?Obviously COBOLSlide 14.7© The McGraw-Hill Companies, 2002Choice of Programming Language (contd)What happens when new language (C++, say) is introduced–New hires–Retrain existing professionals–Future products in C++–Maintain existing COBOL products–Two classes of programmers»COBOL maintainers (despised)»C++ developers (paid more)–Need expensive software, and hardware to run it–100s of person-years of expertise with COBOL wastedSlide 14.8© The McGraw-Hill Companies, 2002Choice of Programming Language (contd)Only possible conclusion–COBOL is the “most suitable” programming language And yet, the “most suitable” language for the latest project may be C++–COBOL is suitable for only DP applicationsHow to choose a programming language–Cost-benefit analysis–Compute costs, benefits of all relevant languagesSlide 14.9© The McGraw-Hill Companies, 2002Choice of Programming Language (contd)Which is the most appropriate object-oriented language?–C++ is (unfortunately) C-like–Java enforces the object-oriented paradigm–Training in the object-oriented paradigm is essential before adopting any object-oriented languageWhat about choosing a fourth generation language (4GL)?Slide 14.10© The McGraw-Hill Companies, 2002Fourth Generation LanguagesFirst generation languages–Machine languagesSecond generation languages–Assemblers Third generation languages–High-level languages (COBOL, FORTRAN, C++) Fourth generation languages (4GLs)–One 3GL statement is equivalent to 5–10 assembler statements–Each 4GL statement intended to be equivalent to 30 or even 50 assembler statementsSlide 14.11© The McGraw-Hill Companies, 2002Fourth Generation Languages (contd)It was hoped that 4GLs would–Speed up application-building –Applications easy, quick to change»Reducing maintenance costs–Simplify debugging –Make languages user friendly»Leading to end-user programmingAchievable if 4GL is a user friendly, very high-level languageSlide 14.12© The McGraw-Hill Companies, 2002Fourth Generation Languages (contd)Example –(“Just in Case You Wanted to Know” box, page 438)The power of a nonprocedural language, and the priceSlide 14.13© The McGraw-Hill Companies, 2002Productivity Increases with a 4GL?The picture is not uniformly rosyProblems with–Poor management techniques–Poor design methodsJames Martin suggests use of–Prototyping–Iterative design–Computerized data management–Computer-aided structuringIs he right? Does he (or anyone else) know?Slide 14.14© The McGraw-Hill Companies, 2002Actual Experiences with 4GLsPlaytex used ADF, obtained an 80 to 1 productivity increase over COBOL–However, Playtex then used COBOL for later applications 4GL productivity increases of 10 to 1 over COBOL have been reported –However, there are plenty of reports of bad experiencesSlide 14.15© The McGraw-Hill
View Full Document