DESIGN 2: DETAILED DESIGN

Slides:



Advertisements
Similar presentations
CSC271 Database Systems Lecture # 18. Summary: Previous Lecture  Transactions  Authorization  Authorization identifier, ownership, privileges  GRANT/REVOKE.
Advertisements

Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Using UML, Patterns, and Java Object-Oriented Software Engineering Royce’s Methodology Chapter 16, Royce’ Methodology.
Requirements and Design
Introduction To System Analysis and Design
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Detailed Design Kenneth M. Anderson Lecture 21
Component-Level Design
Computer Engineering 203 R Smith Requirements Management 6/ Requirements IEEE Standard Glossary A condition or capability needed by a user to solve.
Chapter 2: Algorithm Discovery and Design
Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
SE 555 Software Requirements & Specification Beyond Requirements Based on Weigers Chapter17.
Design 15 February. Software Engineering: Elaborated Steps Concept (contract, intro on web site) Requirements (use cases, requirements) Architecture Design.
Software Requirements
The case study ‘Encounter’ Section ‘About case studies’ 4 th Workshop “Software Engineering Education and Reverse Engineering” Zagreb, 5 – 12 September.
Chapter 1 Program Design
Chapter 2: Algorithm Discovery and Design
Chapter 2: Algorithm Discovery and Design
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
6. DESIGN II: DETAILED DESIGN. Plan project Integrate & test system Analyze requirements Design Maintain Test unitsImplement Software Engineering Roadmap:
Introduction To System Analysis and design
UML - Development Process 1 Software Development Process Using UML (2)
CS 4310: Software Engineering Lecture 3 Requirements and Design.
1 Shawlands Academy Higher Computing Software Development Unit.
Chapter 2 The process Process, Methods, and Tools
1 BTEC HNC Systems Support Castle College 2007/8 Systems Analysis Lecture 9 Introduction to Design.
Prologue: The Software Process. Main Phases of Software Process 1. Requirements Analysis (answers “WHAT?”) Specifying what the application must do 2.
Chapter 5 Design Principles II: Flexibility, Reusability, and Efficiency.
Lecture # 06 Design Principles II
UNIT TESTING. Plan project Integrate & test system Analyze requirements Design Maintain Test units Implement Software Engineering Roadmap Identify corporate.
Chapter 13 Requirements and Domain Classes. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFrameworkDetailed.
Chapter 5 Design Principles II: Flexibility, Reusability, and Efficiency.
What is a life cycle model? Framework under which a software product is going to be developed. – Defines the phases that the product under development.
CS 3610: Software Engineering – Spring 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 7 Requirements and Domain Classes SWE 316: Software Design and Architecture.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
SOFTWARE SYSTEMS DEVELOPMENT 4: System Design. Simplified view on software product development process 2 Product Planning System Design Project Planning.
Software Engineering Modern Approaches Eric Braude and Michael Bernstein 1.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
INFO 637Lecture #101 Software Engineering Process II Review INFO 637 Glenn Booker.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
CS 3610: Software Engineering – Fall 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class project.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
ANU comp2110 Software Design lecture 5 COMP2110 Software Design in 2003 lecture 5 Requirements Specifications lecture 3 of 3 The Encounter game case study.
Chapter 1 Programming Review and Introduction to Software Design.
Software Engineering Modern Approaches Eric Braude and Michael Bernstein 1.
Software Engineering Modern Approaches Eric Braude and Michael Bernstein 1.
Requirements Management with Use Cases Module 10: Requirements Across the Product Lifecycle Requirements Management with Use Cases Module 10: Requirements.
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
CSC 480 Software Engineering Testing - I. Plan project Integrate & test system Analyze requirements Design Maintain Test units Implement Software Engineering.
Week 3: Requirement Analysis & specification
Approaches to ---Testing Software Some of us “hope” that our software works as opposed to “ensuring” that our software works? Why? Just foolish Lazy Believe.
Topic 4 - Database Design Unit 1 – Database Analysis and Design Advanced Higher Information Systems St Kentigern’s Academy.
The Hashemite University Computer Engineering Department
UML - Development Process 1 Software Development Process Using UML.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
CSC480 Software Engineering Lecture 7 September 16, 2002.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
CSC 480 Software Engineering
Approaches to ---Testing Software
Unified Modeling Language
Software Engineering Modern Approaches
COMP2110 Software Design in 2004 lecture 09 High level design
Presentation transcript:

DESIGN 2: DETAILED DESIGN

Software Engineering Roadmap: Chapter 6 Focus Develop Architecture - see chapter 5 Identify corporate practices Perform Detailed Design - apply design patterns - accommodate use cases supply methods - exploit libraries (Java, Swing…) - describe methods where required - develop detailed object models - dev. detailed logic (pseudo-code) Plan project Analyze requirements Maintain Integrate & test system Design Implement Test units Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Chapter Learning Goals Understand how design patterns describe some detailed designs Specify classes and functions completely Specify algorithms use flowcharts use pseudocode Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

1. Introduction to Detailed Design Objective: To fully prepare for implementation of a system that meets requirements. Outcomes: (1) blueprints (models), (2) associated details (documentation), (3) detailed implementation plan for construction, integration and testing

Relating Use Cases, Architecture, & Detailed Design 1. Use case -- analysis “Cars should be able to travel from the top of Smith Hill at 65 mph, travel in a straight line, and arrive at Jones Hollow within 3 minutes.” 2. Domain classes 3. Architecure Cable Auto Road Pylon

Relating Use Cases, Architecture, & Detailed Design 1. Use case (part of requirements) “Cars should be able to travel from the top of Smith Hill at 65 mph, travel in a straight line, and arrive at Jones Hollow within 3 minutes.” 2. Domain classes 3. Architecure Cable (not specifically required) Auto Road Pylon 4. Detailed Design (added for detailed design) Support use case Auto Guardrail Cable Road Smith Hill Pylon Jones Hollow Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

What is the difference between high-level (architectural) design and detailed design? High-Level Design Detailed Design

Typical Roadmap for Detailed Design 1. Begin with architectural models -- see chapter 5 class model: domain & architectural classes overall state model* overall data flow model* use case model Typical Roadmap for Detailed Design 2. Introduce classes & design patterns* which connect the architecture classes with the domain classes -- sections 1 and 5 concentrate on riskiest parts first; try alternatives 3. Refine models, make consistent, ensure complete 4. Specify class invariants* -- section 3.1 For each class ... For each method ... 5. Specify methods with pre- and post-conditions, flowcharts* & pseudocode* -- sections 3 and 4 For each unit ... 6. Sketch unit test plans -- see chapter 8 7. Inspect test plans & design -- section 9 * if applicable 8.Release for implementation Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Organize the Team for Detailed Design 1/2 One way to ... 1. Prepare for a detailed design kick-off meeting. Ensure team members aware of the models (views) they are expected to produce typically object model, sequence diagrams, state, & data flow Ensure team members aware of the notation expected typically: UML plus a pseudocode standard and/or example Design leader prepares list of modules Design leader creates a meeting agenda Project leader allocates time to agenda items (people can speak about detailed designs indefinitely if allowed to!) allocate the time among the agenda items Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Organize the Team for Detailed Design 2/2 One way to ... 2. Hold the kick-off meeting Designate someone to monitor the agenda item time Confirm that the architecture is ready for detailed design Make sure that module interfaces the are clear revise as a group if not Don’t try to develop detailed designs as a group not necessary: individuals have the responsibility groups are seldom good at designing details together Allocate modules to members Request time estimates to design lead by a fixed date Write out the conclusions and copy/e-mail every member Decide how and when the results are to be reviewed 3. Update the documentation set more detailed schedule with modules & inspections 4. Inspect the detailed designs (see section 9) 5. Rework as a result of inspections 6. Conduct post mortem and write out lessons learned Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Unified Software Development Process: Design U. P. Term Requirements Analysis Design Implemen- tation Test (Jacobson et al) Inception Elaboration Construction Transition 1* Jacobson et al: 2 3 Prelim. iterations Iter. #1 Iter. #n Iter. #n+1 Iter. #m Iter. #m+1 Iter. #k ….. ….. *Key: terminology used in this book “Detailed design” 1 = “Requirements” 2 = “Achitecture” 3 =

Analysis Design 1. Conceptual & abstract 1/2 After Jacobson et al: USDP 1. Conceptual & abstract 2. Applicable to several designs 3. «control», «entity» & «boundary» class stereotypes 4. Less formal 5. Less expensive to develop 1. Concrete: implementation blueprint 2. Specific for an implementation 3. No limit on class stereotypes 4. More formal 5. More expensive to develop (~ 5 times)

Analysis Design 6. Manifests the design (architecture one view) 2/2 After Jacobson et al: USDP 6. Outlines the design 7. Emerges from conceptual thinking 8. Flexibility still exists for process modifications 9. Relatively unconstrained 10. Less focus on sequence diagrams 11. Few layers 6. Manifests the design (architecture one view) 7. May use tools (e.g. visual, round-trip engineering) 8. Maintaining estabished process is a high priority 9. Constrained by the analysis & architecture 10. More focus on seq. diag. 11. Many layers

Designing Against Interfaces Client code Used code Abstract layer BillingClient listCustomers() billCustomers() Customer bill() printAccounts() -- written in terms of Customer (not specific types of Customer) Concrete (non-abstract) layer RegularCustomer bill() printAccounts() Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Reusing Components Functionality we need is becoming more convenient to locate and reuse Microsoft MFC library Visual Basic controls COM objects OMG’s CORBA Javascript and Java Applet libraries JavaBeans (servlet code) Enterprise JavaBeans

2. Sequence and data flow diagrams for detailed design

Refine Models for Detailed Design 1/2: Sequence Diagrams One way to ... 1. Begin with the sequence diagrams constructed for detailed requirements and/or architecture (if any) corresponding to the use cases. 2. Introduce additional use cases, if necessary, to describe how parts of the design typically interact with the rest of the application. 3. Provide sequence diagrams with complete details be sure that the exact objects & their classes are specified select specific function names in place of natural language (calls of one object to another to perform an operation) Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Refine Models for Detailed Design 2/2: Data Flow Diagrams One way to ... 1. Gather data flow diagrams (DFD’s) constructed for detailed requirements and/or architecture (if any). 2. Introduce additional DFD’s, if necessary, to explain data and processing flows. 3. Indicate what part(s) of the other models the DFD’s corresponds to. e.g., “the following DFD is for each Account object” 4. Provide all details on the DFD’s indicate clearly the nature of the processing at each node indicate clearly the kind of data transmitted expand processing nodes into DFD’s if the processing description requires more detail Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Requirements: Sequence Diagram for Engage Foreign Character Use Case :Encounter Game freddie: Foreign Character :Engagement :Engagement Display :Player Character 1.1 create; display 1.2 create 2.1 execute 2.2 change quality values 3.1 Display result 3.2 create Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Design: Sequence Diagram for Encounter Foreign Character Use Case game :Encounter Cast freddie: Foreign Character engagement: Engagement 1.1 displayForeignChar() :Engagement Display 1.2 display() 1.3 new Engagement() 2. execute() :Player’s main character 2.1 setPlayerQuality() 2.2 setQuality() 2.3 setForeignQuality() 3.1 new EngagementDisplay() 2.4 setQuality() 3.2 displayResult() Design: Sequence Diagram for Encounter Foreign Character Use Case Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Classes of the EncounterForeignCharacter Use Case Engagement execute() EngagementDisplay displayResult() EncounterGame PlayerCharacter setQuality() EncounterCast displayForeignChar() setPlayerQuality() setForeignQuality() ForeignCharacter setQuality() Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Detailed Data Flow Diagram for a Banking Application Customer. getDetails() Account. getDeposit() customer info User screen template Account. getPass- word() verifyPass- pass- word Account unacceptable ATM users Cus- tomer Deposit- screen. display() status local log Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

A helpful demonstration: CRC Cards Class Responsibility and Collaboration cards provide an effective technique for exploring the possible ways of allocating responsibilities to classes and the collaborations that are necessary to fullfil the responsibilities. A helpful demonstration: http://www.csd.abdn.ac.uk/~ecompata/teaching/CS3015/information/crc.shtml

Design Refinement with CRC Cards Exercise: Use Case: You are registering for a new course in astronomy. You require permission from the instructor and you must interact with the registrars office to signup and pay for the course. Develop the classes and responsibilities using CRC cards

3. Specifying classes and functions

Specify A Class 1. Gather the attributes listed in the SRS. One way to ... 1. Gather the attributes listed in the SRS. if the SRS is organized by class 2. Add additional attributes required for the design. 3. Name a method corresponding to each of the requirements for this class. easy if the SRS is organized by class 4. Name additional methods required for the design. 5. Show the attributes & methods on the object model. 6. State class invariants. Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Specify a Function One way to ... 1. Note the section(s) of the SRS or SDD which this function (method) satisfies. 2. State what expressions the function must leave invariant. 3. State the method’s pre-conditions (what it assumes). 4. State the method’s post-conditions (its effects). 5. Provide pseudocode and/or a flowchart to specify the algorithm to be used. unless very straightforward Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Classes at Detailed Design Data type Range Default value Security issues Canister Class name + numCanisters: int - numWafers: int - size: float Attribute: type +: visible from without + display() - getNumSlotsOpen() + setStatus() Operations Interface specs Functional details Invariants Responsibilities: -- describes each canister undergoing fabrication Place for comments Instance details Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

4. Specifying algorithms

Flowchart Example for setName() Parameter & settings make sense? N Y Nominal path Set _name to “defaultName" Parameter name too long? N Y protected final void setName( String aName ) { // Check legitimacy of parameter and settings if( ( aName == null ) || ( maxNumCharsInName() <= 0 ) || ( maxNumCharsInName() > alltimeLimitOfNameLength() ) ) { _name = new String( "defaultName" ); System.out.println ( "defaultName selected by GameCharacter.setName()"); } else // Truncate if aName too long if( aName.length() > maxNumCharsInName() ) _name = new String ( aName.getBytes(), 0, maxNumCharsInName() ); else // assign the parameter name _name = new String( aName ); Set _name to parameter Truncate name Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Pseuodocode Example FOR number of microseconds supplied by operator IF number of microseconds exceeds critical value Try to get supervisor's approval IF no supervisor's approval abort with "no supervisor approval for unusual duration" message ENDIF ENDIF See later section tbd for inspection results of this pseudocode . . . .

Pseudocode Extraction //p FOR number of microseconds supplied by operator for( int i = 0; i < numMicrosecs; ++I ) { //p IF number of microseconds exceeds critical value if( numMicrosecs > XRayPolicies.CRITICAL_NUM_MICROSECS ) //p Try to get supervisor's approval int supervisorMicrosecsApproval = getApprovalOfSuperForLongExposure();  //p IF no supervisor approval if( supervisorMicrosecsApproval <= 0 ) throw ( new SupervisorMicrosecsApprovalException() ); . . . . . . . . . Pseudocode Extraction Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Advantages of Pseudocode & Flowcharts Clarify algorithms in many cases Impose increased discipline on the process of documenting detailed design Provide additional level at which inspection can be performed Help to trap defects before they become code Increases product reliability May decrease overall costs Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Disadvantages of Pseudocode & Flowcharts Creates an additional level of documentation to maintain Introduces error possibilities in translating to code May require tool to extract pseudocode and facilitate drawing flowcharts Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

5. Design Patterns II: Techniques of detailed design

Apply Design Patterns in Detailed Design One way to ... 1. Become familiar with the design problems solved by design patterns at a minimum, understand the distinction among (C) creational vs. (S) structural vs. (B) behavioral patterns Consider each part of the detailed design in turn: 2. Determine whether the problem has to do with (C) creating something complex, (S) representing a complex structure, or (B) capturing behavior 3. Determine whether there is a design patterns that addresses the problem try looking in the category identified (C, S, or B) use this book and/or Gamma et al [Ga] 4. Decide if benefits outweigh drawbacks benefits usually include increased flexibility drawbacks increased class complexity(?), less efficient(?) Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

User Interface Design System users often judge a system by its interface rather than its functionality A poorly designed interface can cause a user to make catastrophic errors Poor user interface design is the reason why so many software systems are never used

User-Centred design User-centred design is an approach to UI design where the needs of the user are paramount and where the user is involved in the design process UI design always involves the development of prototype interfaces See UI_design.ppt

7. Standards, notation and tools for detailed design

6.1 Module detailed design Architecture IEEE 1016-1987 Software Design Document Table of Contents (Reaffirmed 1993) 1. Introduction 1.1. Purpose 1.2. Scope 1.3. Definitions, acronyms & abbreviations 2. References 3. Decomposition description 3.1. Module decomposition 3.1.1 Module 1 description 3.1.1 Module 2 description 3.2 Concurrent process decomposition 3.2.1 Process 1 description 3.2.2 Process 2 description 3.3 Data decomposition 3.3.1 Data entry 1 description 3.3.2 Data entry 2 description 4. Dependency description 4.1 Intermodule dependencies 4.2 Interprocess dependencies 4.3 Data dependencies 5. Interface description 5.1 Module interface 5.1.1 Module 1 description 5.1.2 Module 2 description 5.2 Process interface 5.2.1 Process 1 description 5.2.2 Process 2 description 6. Detailed design 6.1 Module detailed design 6.1.1 Module 1 detail 6.2.2 Module 2 detail 6.2 Data detailed design 6.2.1 Data entity 1 detail 6.2.2 Data entity 2 detail Architecture Can be replaced with: 6.1 Class#1 detailed design 6.1.1 Attributes 6.1.2 Methods 6.1.3 Instance details 6.1.4. Other: - UI details (if applicable)

8. Effects on projects of completing detailed designs

Bring the Project Up-to-Date After Completing Detailed Design 1. Make sure the SDD reflects latest version of detailed design, as settled on after inspections. 2. Give complete detail to the schedule (SPMP). 3. Allocate precise tasks to team members (SPMP). 4. Improve project cost & time estimates (see below). 5. Update the SCMP to reflect the new parts. 6. Review process by which the detailed design was created, & determine improvements. Include ... time taken; broken down to include preparation of the designs inspection change defect summary number remaining open, found at detailed design, closed at detailed design where injected; include previous phases & detailed design stages Bring the Project Up-to-Date After Completing Detailed Design One way to ... Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Estimate Size & Time from Detailed Designs One way to ... 1. Start with the list of methods ensure completeness, otherwise underestimate will result 2. Estimate the lines of code (LOC) for each classify as very small, small, medium, large, very large normally in ± 7% / 24% / 38% / 24% / 7% proportions use personal data to covert to LOC otherwise use Humphry’s table below 3. Sum the LOC 4. Covert LOC to person-hours use personal conversion factor if possible otherwise use published factor 5. Ensure that your estimates of method sizes and time will be compared and saved at project end. Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

9. Quality in detailed designs

Inspect‡ Detailed Designs 1 of 2 One way to ... 1. Prepare to record metrics during the design process. Include (1.1) time taken; (1.2) type of defect; (1.3) severity 2. Ensure each architecture module is expanded. 3. Ensure each detail is part of the architecture. if a detail does not belong to any such module, the architecture may have to be revised 4. Ensure the design fulfills its required functions 5. Ensure that design is complete (classes & methods) 6. Ensure that the design is testable. Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission. ‡ See chapter 1 for inspection procedures.

Inspect Detailed Designs 2 of 2 7. Check detailed design for -- simplicity a design that few can understand (after a legitimate effort!) is expensive to maintain, and can result in defects generality enables design of similar applications? expandability enables enhancements? efficiency speed, storage portability 8. Ensure all details are provided only code itself is excluded as a “detail” the detail work must be done eventually, and this is the best time to do it: don’t postpose One way to ... Inspect Detailed Designs 2 of 2 Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Inspection for Defects Identify defect and its type Specify its severity (two methods following slides) Identify the source of the defect – so that the defect does not occur in another project … At another time, usually one person works on a resolution to defect

Table 6.2 IEEE 1044.1 Severity classification Description Urgent Failure causes system crash, unrecoverable data loss; or jeopardizes personnel High Causes impairment of critical system functions, and no workaround solution does exist Medium Causes impairment of critical system functions, though a workaround solution does exist Low Causes inconvenience or annoyance None None of the above Table 6.2 IEEE 1044.1 Severity classification Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Requirement(s) not satisfied Table 6.3 Defect severity classification using Triage Severity Description Major Requirement(s) not satisfied Medium Neither major nor trivial Trivial A defect which will not affect operation or maintenance Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Types of Defects (1) (IEEE) [PS] Logic problem (forgotten cases or steps; duplicate logic; extreme conditions neglected; unnecessary functions; misinterpretation; missing condition test; checking wrong variable; iterating loop incorrectly etc.) [PS] Computational problem (Equation insufficient or incorrect; precision loss; sign convention fault) Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Types of Defects (3) [XDOC, PS] Data problem (sensor data incorrect or missing; operator data incorrect or missing; embedded data in tables incorrect or missing; external data incorrect or missing; output data incorrect or missing; input data incorrect or missing) [XDOC, PS] Documentation problem (ambiguous statement etc.) Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Types of Defects (4) [XDOC, PS] Document quality problem (Applicable standards not met etc.) [XDOC, PS] Enhancement (change in program requirements etc.) [XDOC, PS] Failure caused by a previous fix Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Types of Defects (5) [PS] Suspect performance problem (inefficient logic, data structure) [XDOC, PS] Interoperability problem (not compatible with other software or component) [XDOC, PS] Standards conformance problem Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Pseudocode for Inspection 1 2 3 4 5 6 7 8 9 10 IF aQuality is not recognized Log error to log file Inform user qualities unchanged ELSE IF aQualityValue out of bounds Set the stated quality to aQualityValue Reduce the remaining qualities, ... retaining their mutual proportion, ... making the sum of qualities unchanged ENDIF setQuality() should be mentioned Make these preconditions; don’t check. Lacks detail on how to allocate the remaining quality values Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Case Study

Detailed Design of RolePlayingGame Package GameState handleEvent() RPGame handleEvent() state { state.handleEvent(); } . . . .

Detailed Design of RolePlayingGame Package MouseListener { rPGameS.handleEvent(); } rPGameS RPGMouseEventListener mouseEnter() GameState handleEvent() RPGame handleEvent() stateS { stateS.handleEvent(); } Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Sequence Diagram for Handling Mouse Events User eventTarget :RPGame :GameState :RPGMouseEventListener 1. mouse action 2. mouseClicked() 3. handleEvent ( Event ) 4. handleEvent ( Event) Sequence Diagram for Handling Mouse Events Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

RPG Video Game Architecture Packages -- showing domain classes only RolePlayingGame Characters «framework package» «framework package» EncounterGame «uses» «application package» EncounterCharacters «uses» EncounterGame Engagement «application package» EngagementDisplay EncounterCharacter GameEnvironment PlayerCharacter «framework package» ForeignCharacter EncounterEnvironment «uses» PlayerQualityWindow «application package» Area EncounterAreaConnection GameArtifacts ConnectionHyperlink «framework package» Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Detailed Design of EncounterGameDisplays Sub-package MouseListener EncounterGameDisplays EncounterDisplayItem EncounterCast EncounterDisplay Detailed Design of EncounterGameDisplays Sub-package QualListDispl SetQualValueDispl QualValueDispl Reporting handleEvent() EngagementDisplay Preparing handleEvent() SetQualityDisplay Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Sequence Diagram for Dismissing Engagement Display User :EngagementDisplay :RPGMouse EventListener 1. hit dismiss button :ReportingEncounter 2. mouseClicked() :EncounterGame 3. handleEvent() 4. handleEvent() 5. setVisible( false )  6. setState (new Waiting())  Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Sequence Diagram for Player Completes Setup User :PlayerQualityWindow :SettingUp :RPGMouse EventListener 1. hit dismiss button 2. mouseClicked() :EncounterGame 3. handleEvent() 4. handleEvent() 5. setVisible( false )  6. setState (new Waiting())  Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Sequence Diagram for Player Moves to Adjacent Area User :AreaConnectionHyperlink :EncounterCast :Waiting 1. hit area connection hyperlink :RPGMouse EventListener :EncounterEnvironment :EncounterGame 2. mouseClicked() 3. handleEvent() 4. handleEvent() 5. setVisible( false )  6. displayArea() 7. displayPlayerCharacter() If foreign character present Sequence Diagram for Player Moves to Adjacent Area 8. displayForeignCharacter() 9. setState (new Engaging()) Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Detailed Design of EncounterCharacters Package «framework package» GameCharacter EncounterCharacters «application package» EncounterCharacter PlayerCharacter «facade» EncounterCast ForeignCharacter Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

EncounterEnvironment Package GameEnvironment GameArea GameCharacter GameAreaConnection . . . .

EncounterEnvironment Package GameEnvironment GameArea GameCharacter GameAreaConnection Area EncounterAreaConnection EncounterEnvironment ConnectionHyperlink EncounterEnvironment Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.