Learning objectives: Software Engineering. CSI1102: Introduction to Software Design. The Software Life Cycle. About Maintenance

Similar documents
Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Chapter 1: Principles of Programming and Software Engineering

Entity Relationship Modelling

Software Development Cycle. Unified Modeling Language. Unified Modeling Language. Unified Modeling Language. Unified Modeling Language.

Data Analysis 1. Chapter 2.1 V3.1. Napier University Dr Gordon Russell

The requirements engineering process

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Tutorial notes on. Requirements analysis

ER modeling. Lecture 4

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Chapter 1: Programming Principles

MSO Analysis & UML. Hans Philippi (based on the course slides of Wouter Swierstra) August 24, Analysis & UML 1 / 56

LABORATORY 1 REVISION

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Software Development Process Models


SE 2730 Final Review

Scenario-Based Analysis. Scenario-Based Analysis (example) Form analysis

Object-Oriented Software Engineering Practical Software Development using UML and Java

Textbook. Topic 6: Functions. Motivation. What is a Function? What s a function? How can we use functions to write better software?

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

Introduction to Software Engineering

The software lifecycle and its documents

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Software Testing. Software Testing

A Data Modeling Process. Determining System Requirements. Planning the Project. Specifying Relationships. Specifying Entities

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

UNIT-IV BASIC BEHAVIORAL MODELING-I

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Object-Oriented Systems Analysis and Design Using UML

Software Testing part II (white box) Lecturer: Giuseppe Santucci

MTAT Software Engineering. Written Exam 17 January Start: 9:15 End: 11:45

Chapter 10 Classes Continued. Fundamentals of Java

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

Chapter 4. In this chapter, you will learn:

BCS Higher Education Qualifications. Diploma in IT. Object Oriented Programming Syllabus

Overview of Sentence Order Reference Document Development Process

Specifying and Prototyping

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis

CSE 403: Software Engineering, Spring courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams. Emina Torlak

Sample Exam Syllabus

Lecture 7: Data Abstractions

Review of Basic Software Design Concepts. Fethi Rabhi SENG 2021

Lecture Chapter 2 Software Development

Design and UML Class Diagrams

Object-Oriented Design

Instructional Alignment Chart

Unit Testing as Hypothesis Testing

Chapter : Analysis Modeling

(Refer Slide Time: 02.06)

12/30/2013 S. NALINI,AP/CSE

UNIT 3 ARRAYS, RECURSION, AND COMPLEXITY CHAPTER 11 CLASSES CONTINUED

Cmpt 135 Assignment 2: Solutions and Marking Rubric Feb 22 nd 2016 Due: Mar 4th 11:59pm

INTRODUCING A MULTIVIEW SOFTWARE ARCHITECTURE PROCESS BY EXAMPLE Ahmad K heir 1, Hala Naja 1 and Mourad Oussalah 2

Software Testing CS 408. Lecture 11: Review 2/20/18

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Software Testing TEST CASE SELECTION AND ADEQUECY TEST EXECUTION

Chapter 11 Classes Continued

UML. By Somenath Mukhopadhyay.

Chapter 2: The Object-Oriented Design Process

Design Engineering. Dr. Marouane Kessentini Department of Computer Science

History of object-oriented approaches

The following topics will be covered in this course (not necessarily in this order).

Introduction to Software Engineering p. 1 The Scope of Software Engineering p. 3 Historical Aspects p. 4 Economic Aspects p. 7 Maintenance Aspects p.

DATABASE SYSTEMS. Chapter 5 Entity Relationship (ER) Modelling DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

Chapter 9. Software Testing

CSE 331 Midterm Exam Sample Solution 2/13/12

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

CS3205 HCI IN SOFTWARE DEVELOPMENT INTRODUCTION TO PROTOTYPING. Tom Horton. * Material from: Floryan (UVa) Klemmer (UCSD, was at Stanford)

HVRSD Standards-Based Report Card Correlations for Math. Grade 1

CSE 331 Midterm Exam 2/13/12

Practical UML - A Hands-On Introduction for Developers

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D

UML- a Brief Look UML and the Process

A l Ain University Of Science and Technology

Unit Testing as Hypothesis Testing

Information Technology Audit & Cyber Security

h(p://ihm.tumblr.com/post/ /word- cloud- for- hci- human- computer- interacbon CS5340 Human-Computer Interaction ! January 31, 2013!

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Chapter 6: Entity-Relationship Model

Principles of Software Construction: Objects, Design, and Concurrency

A l Ain University Of Science and Technology

First Grade - Math. Trimester 1: Trimester 2: Trimester 3:

*ANSWERS * **********************************

SOFTWARE ENGINEERING. Software Specification Software Design and Implementation Software Validation. Peter Mileff PhD

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns

: Principles of Automated Reasoning and Decision Making Midterm

Metrics and OO. SE 3S03 - Tutorial 12. Alicia Marinache. Week of Apr 04, Department of Computer Science McMaster University

Program Correctness and Efficiency. Chapter 2

1. Write two major differences between Object-oriented programming and procedural programming?

CS SOFTWARE ENGINEERING QUESTION BANK SIXTEEN MARKS

Examination Questions Time allowed: 1 hour 15 minutes

CSE 403 Lecture 8. UML Class Diagrams. Thanks to Marty Stepp, Michael Ernst, and other past instructors of CSE 403

M301: Software Systems & their Development. Unit 4: Inheritance, Composition and Polymorphism

Through a Glass, Darkly: Object-Oriented Testing. Through A Glass, Darkly:

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

MSO Exam November 7, 2016, 13:30 15:30, Educ-Gamma

ECE 122. Engineering Problem Solving with Java

Conceptual Design. The Entity-Relationship (ER) Model

Transcription:

CSI1102: Introduction to Software Design Chapter 10: Introduction to Software Engineering Learning objectives: Software Engineering The quality of the software is a direct result of the process we follow to create it Understand the need for and use of software development models the software life cycle and its implications linear vs. iterative development approaches goals and techniques of testing an evolutionary approach to object-oriented development 2 The Software Life Cycle About The overall life cycle of a program includes use and maintenance: Use tasks include any modifications to an existing program; enhancements and defect removal Easy, careful and velopment easy to maintain efforts tend to far outweigh the development effort in today s software A version of the software that is made available to user is called a release 3 Software engineering GOAL: minimize the overall effort required to create and to maintain the program 4 vs. and Effort Use and e.g. Y2K Small increases in development effort can reduce maintenance effort Spend more time on, documentation and implementation 5 6

and Effort Developing high quality software: Software Models Often the maintainers of a program are not the program s original developers (average 3 year rule ) Maintainers must be able to understand a program must be able to understand a program they didn t The ability to read and understand a program depends on how clearly the requirements are established how well the program is ed how well the program is implemented how well the program is documented 7 A software development model is an organized approach to creating quality software Too many programmers follow a build-and-fix approach They write a program and modify it until it is functional, without regard to system Errors are addressed haphazardly if and as they are discovered It is not really a development model at all 8 The Build-and-Fix Approach The Waterfall Model The waterfall model was developed in the mid 1970s Write program Modify program Activities that must be specifically addressed during development include: ing clear and unambiguous requirements Creating a clean from the requirements Implementing the Testing the implementation 9 Originally it was proposed as a linear model, without backtracking 10 The Waterfall Model Iterative : Waterfall method with backtracking requirements Create Implement code Iterative development allows the developer to cycle through the different development stages Backtracking should not be used irresponsibly When use backtracking? Test system To deal with unexpected problems arising only in later stages of development 11 12

An Iterative Process Important: Iterative Testing requirements Create Implement code Test system The results of each stage should be evaluated carefully prior to going on to the next stage Before moving on to the, for example, the requirements should be evaluated to ensure completeness, consistency, and clarity A evaluation should ensure that each requirement was addressed adequately 13 14 Testing Techniques: Walkthrough A or an implementation may be evaluated during a walkthrough The goal of a walkthrough is to identify problems, not to solve them Testing Techniques: Create test cases Generally, the goal of testing is to find errors Often it is called defect testing A good test uncovers problems in a program 15 A test case includes a set of inputs user actions or other initial conditions expected output It is not feasible to test every possible case 16 Testing technique: Black-Box Testing Black-box testing maps a set of specific inputs to a set of expected outputs An equivalence category is a collection of input sets E.g. positive integer category, 0..99 Test cases: -9, -500, 5, 12, 101, 300 Two input sets belong to the same equivalence category if there is reason to believe that if one works, it will work for the other Therefore testing one input set essentially tests the entire category Testing technique: White-Box Testing White-box testing also is referred to as glass-box testing It focuses on the internal logic such as the implementation of a method we walk through the code Statement coverage guarantees that all statements in a method are executed Condition coverage guarantees that all paths through a method are executed 17 18

Prototypes: Use to sell your ideas A prototype is a program created to explore a particular concept Prototyping is more useful, time-effective, and costeffective than merely acting on an assumption that later may backfire Usually a prototype is created to communicate to the client: a particular task the feasibility of a requirement a user interface Throw-away vs. Evolutionary Prototypes A quick and dirty prototype to test an idea or a concept is called a throw-away prototype Throw-away prototypes are not incorporated into final systems Because it is ed more carefully, an evolutionary prototype can be incorporated into the final system Evolutionary prototypes provide a double benefit, but at a higher cost It is a way of validating requirements 19 20 Developing large software: Evolutionary Approach An Evolutionary Model Evolutionary development divides the process into architectural (high level) - primary classes and interaction detailed - specific classes, methods, and algorithms requirements Architectural Unit and integration test refinement scope Identify classes & objects System test This allows us to create refinement cycles Each refinement cycle focuses on one aspect of the system As each refinement cycle is addressed, the system evolves 21 Implementation Detailed Identify relationships 22 Refinement Cycle: #1 the Scope Refinement Cycle: #2 Identify relevant classes/objects First, we establish the refinement scope to define the specific nature of the next refinement For example: the user interface the feasibility of a particular requirement utility classes for general program support Object-oriented programming is well suited to this approach Choosing the most appropriate next refinement is important and requires experience 23 Identify classes and objects that relate to the current refinement Look at the nouns in the requirements document Candidates categories include physical objects (books, balls, etc.) People (student, clerk, professor, etc.) Places (room, airport, etc.) Containers (bookcase, transaction list, etc.) Occurrences (sale, meeting, accident, etc.) Information stores (catalog, event log) Categories may overlap Consider reusing existing classes 24

Refinement Cycle: #3 Identify relationships Identify relationships among classes general association ( uses ) aggregation ( has-a ) inheritance ( is-a ) Associated objects use each other for the services they provide Aggregation, also called composition, permits one object to become part of another object Cardinality describes the numeric relationship between the objects For example, a car might have four wheels associated Refinement Cycle: #3 (cont.) Inheritance Inheritance, discussed in detail in Chapter 7, may lead to the creation of a new parent abstract class whose sole purpose is to gather common data and common methods in one place Use UML class diagrams to show the relationships with it 25 26 Refinement Cycle: #4-6 Detailed, implement and test Finally, a refinement cycle includes detailed, implementation, and testing All the members of each class need to be defined Each class must be implemented (coded) Stubs sometimes are created to permit the refinement code to be tested A unit test focuses on one particular component, such as a method or a class Specification of code Specification of details Invariant: collection of facts which are true Precondition/Postcondition Preconditions: Conditions which are required for code to execute correctly Postconditions: Correct changes which result after code has been executed An integration test focuses on the interaction between components 27 28 Specification of code: An Example (AlarmClock class) Specification of code: An Example (AlarmClock class) Invariant An Alarmclock object - Keeps track of a single alarm time in terms of time and minutes - Cannot distinguish between AM and PM times - Has attribute values restricted to the following ranges: - 1 <= hour <= 12 and 0 <= minutes <= 59 Update Methods public void advanceonehour() precondition hour < 12 modifies hour postcondition The value of hour is one unit larger than before 29 Update Methods (cont ) public void advancetenminutes() precondition minute < 50 modifies minute postcondition The value of minute is 10 units higher than before - We can use formal logic to express the invariant, pre/post conditions - We can then use formal logic to prove that a piece of code is True. Source: The object of Jva, David D Riley, Addison-Wesley, 2002 30

Obtaining the requirements: The PaintBox project TASK (High level): Create a program which allows the user to draw various shapes and sizes on the screen How will we go about accomplishing this? The PaintBox project: Requirements Create a mouse driven GUI Allow user to draw lines, circles, ovals, rectangles and squares Allow user to change drawing color Allow user to fill a shape, except a line, with a color. Allow user to being new drawing Allow user to create polylines 31 32 The PaintBox Project: Initial Refinement steps The PaintBox Project: The Basic User Interface create the basic user interface allow the user to draw and fill shapes and to change color allow the user to select, to move, and to modify shapes allow the user to cut, copy, and paste shapes allow the user to save and to reload drawings allow the user to begin a new drawing at any time File Edit Select Line Oval Rect Color Drawing Area 33 34 The PaintBox Project Discussions with the client lead to additional requirements which are integrated into the requirements document Next the architectural is prepared Refinement steps are determined #1: the basic user interface #2: drawing basic shapes using different stroke colors #3: cutting, copying, and pasting shapes #4: selecting, moving, and filling shapes #5: modifying the dimensions of shapes #6: saving and reloading drawings #7: final touches such as the splash screen Remaining PaintBox Refinements The full implementation can be downloaded for the Book s Website See 10.4 of the text book 35 36

Obtaining user requirements: The toughest part Knowledge acquisition bottleneck : Difficulty to extract information from humans Different personality types: Levels of detail, concepts, thinking holistic, etc. Myers Briggs (16 types), amongst others Processing data and information: concrete versus abstract Decision making: logical and objective versus value related and subjective Introvert versus extravert: stimuli from outside or inside Judgment: random versus open-ended See WWW for tests and for sceptics!!!! Summary: Chapter 10 Chapter 10 has focused on: software development models the software life cycle and its implications linear vs. iterative development approaches goals and techniques of testing an evolutionary approach to object-oriented development 37 38