Modularity!! Guidelines for design! in any programming language!

Size: px
Start display at page:

Download "Modularity!! Guidelines for design! in any programming language!"

Transcription

1 Modularity!! Guidelines for design! in any programming language! 14-1!

2 Modular Software! Software constructed as assemblies of small pieces! 14-2!

3 Modular Software 2! Software constructed as assemblies of small pieces!» Each piece encompasses the data and operations necessary to do one task well! 14-3!

4 Modular Software 3! Software constructed as assemblies of small pieces!» Each piece encompasses the data and operations necessary to do one task well! Modular software ==> maintainable software!» Uses divide and conquer principle! 14-4!

5 Modular Software 4! Software constructed as assemblies of small pieces!» Each piece encompasses the data and operations necessary to do one task well! Modular software ==> maintainable software!» Uses divide and conquer principle! Meyer:!» To achieve extendibility, reusability, compatibility, need modular software and methods to produce modular software! 14-5!

6 Modular Software 5! Software constructed as assemblies of small pieces!» Each piece encompasses the data and operations necessary to do one task well! Modular software ==> maintainable software!» Uses divide and conquer principle! Meyer:!» To achieve extendibility, reusability, compatibility, need modular software and methods to produce modular software! In OO design!!!non-oo design!» Module! Class!!!Module! File! 14-6!

7 Information hiding! Issues in Modular Design! 14-7!

8 Issues in Modular Design 2! Information hiding!» Client sees only interface! 14-8!

9 Issues in Modular Design 3! Information hiding!» Client sees only interface! Independence! 14-9!

10 Issues in Modular Design 4! Information hiding!» Client sees only interface! Independence!» Each module implements a separable part of the whole! 14-10!

11 Issues in Modular Design 4! Information hiding!» Client sees only interface! Independence!» Each module implements a separable part of the whole!» Modules have small, simple interfaces! 14-11!

12 Issues in Modular Design 5! Information hiding!» Client sees only interface! Independence!» Each module implements a separable part of the whole!» Modules have small, simple interfaces!» High interaction between modules is usually symptomatic of a bad modular design! 14-12!

13 Cohesion & Coupling! Key ideas for measuring modularity! 14-13!

14 Cohesion & Coupling 2! Key ideas for measuring modularity!» Cohesion! > How "self contained" is a module! 14-14!

15 Cohesion & Coupling 3! Key ideas for measuring modularity!» Cohesion! > How "self contained" is a module! > No extraneous bits & pieces! 14-15!

16 Cohesion & Coupling 4! Key ideas for measuring modularity!» Cohesion! > How "self contained" is a module! > No extraneous bits & pieces!» Coupling! > How dependent modules are on each other! 14-16!

17 Cohesion & Coupling 5! Key ideas for measuring modularity!» Cohesion! > How "self contained" is a module! > No extraneous bits & pieces!» Coupling! > How dependent modules are on each other! > Size of the common interface! Do you want high or low cohesion and coupling? 14-17!

18 Cohesion & Coupling 5! Key ideas for measuring modularity!» Cohesion! > How "self contained" is a module! > No extraneous bits & pieces!» Coupling! > How dependent modules are on each other! > Size of the common interface! Want high cohesion and low coupling 14-18!

19 Criteria for Modularity! Want a modular design method satisfying!» Decomposability! 14-19!

20 Criteria for Modularity 2! Want a modular design method satisfying!» Decomposability!» Composability! 14-20!

21 Criteria for Modularity 3! Want a modular design method satisfying!» Decomposability!» Composability!» Understandability! 14-21!

22 Criteria for Modularity 4! Want a modular design method satisfying!» Decomposability!» Composability!» Understandability!» Continuity! 14-22!

23 Criteria for Modularity 5! Want a modular design method satisfying!» Decomposability!» Composability!» Understandability!» Continuity!» Protection! 14-23!

24 Criteria for Modularity 6! Want a modular design method satisfying!» Decomposability!» Composability!» Understandability!» Continuity!» Protection! Without these, we cannot produce modular software! 14-24!

25 Decomposability! Decomposition!» Break a problem into sub-problems connected by simple structures! 14-25!

26 Decomposability 2! Decomposition!» Break a problem into sub-problems connected by simple structures! > Minimize communication between sub-problems! 14-26!

27 Decomposability 3! Decomposition!» Break a problem into sub-problems connected by simple structures! > Minimize communication between sub-problems! > Permit further work to proceed separately on each sub-problem! 14-27!

28 Decomposability 4! Decomposition!» Break a problem into sub-problems connected by simple structures! > Minimize communication between sub-problems! > Permit further work to proceed separately on each sub-problem!» Example! > See slides on top down design! 14-28!

29 Composability! Composition!» Produce software from reusable plug and play modules! 14-29!

30 Composability 2! Composition!» Produce software from reusable plug and play modules!» Composed software is itself a reusable module! 14-30!

31 Composability 3! Composition!» Produce software from reusable plug and play modules!» Composed software is itself a reusable module!» Reusable modules work in environments different from the ones in which they were developed! 14-31!

32 Composability 4! Composition!» Produce software from reusable plug and play modules!» Composed software is itself a reusable module!» Reusable modules work in environments different from the ones in which they were developed!» Examples! > Using pipe in the Unix shell to combine Unix commands! 14-32!

33 Composability 5! Composition!» Produce software from reusable plug and play modules!» Composed software is itself a reusable module!» Reusable modules work in environments different from the ones in which they were developed!» Examples! > Using pipe in the Unix shell to combine Unix commands! > See slides on abstract data types and bottom-up design! 14-33!

34 Decomposability and Composability! Composability and decomposability are independent and often at odds! 14-34!

35 Decomposability and Composability 2! Composability and decomposability are independent and often at odds!» Top down design favours generating modules that fulfill specific requirements! 14-35!

36 Decomposability and Composability 3! Composability and decomposability are independent and often at odds!» Top down design favours generating modules that fulfill specific requirements! > Unsuitable for composition! 14-36!

37 Decomposability and Composability 4! Composability and decomposability are independent and often at odds!» Top down design favours generating modules that fulfill specific requirements! > Unsuitable for composition!» Bottom up design favours general modules that are too general! 14-37!

38 Decomposability and Composability 5! Composability and decomposability are independent and often at odds!» Top down design favours generating modules that fulfill specific requirements! > Unsuitable for composition!» Bottom up design favours general modules that are too general! > When combined generate inefficient systems in size and speed! 14-38!

39 Decomposability and Composability 6! Composability and decomposability are independent and often at odds!» Top down design favours generating modules that fulfill specific requirements! > Unsuitable for composition!» Bottom up design favours general modules that are too general! > When combined generate inefficient systems in size and speed! Both top down decomposition and bottom up composition are required! 14-39!

40 Decomposability and Composability 7! Composability and decomposability are independent and often at odds!» Top down design favours generating modules that fulfill specific requirements! > Unsuitable for composition!» Bottom up design favours general modules that are too general! > When combined generate inefficient systems in size and speed! Both top down decomposition and bottom up composition are required!» Trick is to know when and how to best use both methods! 14-40!

41 Understandability! Understandable!» Minimize need to understand module context! 14-41!

42 Understandability 2! Understandable!» Minimize need to understand module context! > Know or examine as few other modules as possible! 14-42!

43 Understandability 3! Understandable!» Minimize need to understand module context! > Know or examine as few other modules as possible! > Very important for maintenance! 14-43!

44 Continuity! The smaller the change in specification, the fewer the number of modules that must be changed (edited) and if possible compiled! 14-44!

45 Continuity 2! The smaller the change in specification, the fewer the number of modules that must be changed (edited) and if possible compiled!» Example! > Use of symbolic constants need to change value in one place but requires recompilation of every module using the constant! 14-45!

46 Understandability and Continuity! Related to coupling and cohesion! A module should do one thing well 14-46!

47 Modular Protection! Confine abnormal run time errors to one or a very few modules! 14-47!

48 Modular Protection 2! Confine abnormal run time errors to one or a very few modules! Avoid propagation of error conditions to neighbouring modules! 14-48!

49 Modular Protection 3! Confine abnormal run time errors to one or a very few modules! Avoid propagation of error conditions to neighbouring modules!» Example! > Validate input before propagating it to other modules! 14-49!

50 Modular Protection 4! Confine abnormal run time errors to one or a very few modules! Avoid propagation of error conditions to neighbouring modules!» Example! > Validate input before propagating it to other modules! Exceptions in languages like C++ and Java can be used in an undisciplined manner leading to violations of protection! 14-50!

51 Modular Protection 5! Confine abnormal run time errors to one or a very few modules! Avoid propagation of error conditions to neighbouring modules!» Example! > Validate input before propagating it to other modules! Exceptions in languages like C++ and Java can be used in an undisciplined manner leading to violations of protection!» Exceptions raised in one part of the system should not be handled by a remote part of the system! 14-51!

52 Design Rules to Ensure Modularity! We have seen criteria for modular software development! 14-52!

53 Design Rules to Ensure Modularity 2! We have seen criteria for modular software development! From them we can deduce the following rules that can help establish the properties we want in our designs! 14-53!

54 Design Rules to Ensure Modularity 3! We have seen criteria for modular software development! From them we can deduce the following rules that can help establish the properties we want in our designs!» Direct Mapping rule! 14-54!

55 Design Rules to Ensure Modularity 4! We have seen criteria for modular software development! From them we can deduce the following rules that can help establish the properties we want in our designs!» Direct Mapping rule!» Few interfaces rule! 14-55!

56 Design Rules to Ensure Modularity 5! We have seen criteria for modular software development! From them we can deduce the following rules that can help establish the properties we want in our designs!» Direct Mapping rule!» Few interfaces rule!» Small interfaces rule! 14-56!

57 Design Rules to Ensure Modularity 6! We have seen criteria for modular software development! From them we can deduce the following rules that can help establish the properties we want in our designs!» Direct Mapping rule!» Few interfaces rule!» Small interfaces rule!» Explicit interfaces rule! 14-57!

58 Design Rules to Ensure Modularity 7! We have seen criteria for modular software development! From them we can deduce the following rules that can help establish the properties we want in our designs!» Direct Mapping rule!» Few interfaces rule!» Small interfaces rule!» Explicit interfaces rule!» Information Hiding rule! 14-58!

59 Direct Mapping Rule! Correspondence The structure used in implementing a software system should remain compatible with the structure used in modeling the system 14-59!

60 Direct Mapping Rule 2! Correspondence The structure used in implementing a software system should remain compatible with the structure used in modeling the system Software design involves addressing needs in a problem domain! 14-60!

61 Direct Mapping Rule 3! Correspondence The structure used in implementing a software system should remain compatible with the structure used in modeling the system Software design involves addressing needs in a problem domain! Have to understand the problem AND its domain, then formulate a solution! 14-61!

62 Direct Mapping Rule 4! Correspondence The structure used in implementing a software system should remain compatible with the structure used in modeling the system Software design involves addressing needs in a problem domain! Have to understand the problem AND its domain, then formulate a solution! Model our solution in some notation (we use BON)! 14-62!

63 Direct Mapping Rule 5! Correspondence The structure used in implementing a software system should remain compatible with the structure used in modeling the system Software design involves addressing needs in a problem domain! Have to understand the problem AND its domain, then formulate a solution! Model our solution in some notation (we use BON)! Need a clear mapping from the proposed solution (in BON) to program source text! 14-63!

64 Direct Mapping Rule 7! Correspondence The structure used in implementing a software system should remain compatible with the structure used in modeling the system Software design involves addressing needs in a problem domain! Have to understand the problem AND its domain, then formulate a solution! Model our solution in some notation (we use BON)! Need a clear mapping from the proposed solution (in BON) to program source text! Arises from continuity and decomposability! 14-64!

65 Few Interfaces Rule! Every module should communicate with as few others as possible 14-65!

66 Few Interfaces Rule 2! Every module should communicate with as few others as possible Restrict the number of communication channels between modules! 14-66!

67 Few Interfaces Rule 3! Every module should communicate with as few others as possible Restrict the number of communication channels between modules! Arises from protection, continuity, composability, decomposability and understandability! 14-67!

68 Few Interfaces Rule 4! Every module should communicate with as few others as possible Restrict the number of communication channels between modules! Arises from protection, continuity, composability, decomposability and understandability! Hub Composite Ring 14-68!

69 Small Interfaces Rule! If two modules communicate, they should exchange as little information as possible! 14-69!

70 Small Interfaces Rule 2! If two modules communicate, they should exchange as little information as possible Also known as weak coupling! 14-70!

71 Small Interfaces Rule 3! If two modules communicate, they should exchange as little information as possible Also known as weak coupling! Relates to the size of connections rather than their number! 14-71!

72 Small Interfaces Rule 4! Historical bad idea: Fortran COMMON block!» COMMON block1 A[75], B[25]!» COMMON block1 C[50], D[50]! > View memory in two different ways!! block1 block !

73 Small Interfaces Rule 5! Local variables via Algol-60 block structure! var i Access all variables in outer block i := i !

74 Explicit Interfaces Rule! Whenever two modules A and B communicate, this must be obvious from the text of A or B or both 14-74!

75 Explicit Interfaces Rule 2!! Whenever two modules A and B communicate, this must be obvious from the text of A or B or both Conversation is limited to a few participants and only a few words! 14-75!

76 Explicit Interfaces Rule 3!! Whenever two modules A and B communicate, this must be obvious from the text of A or B or both Conversation is limited to a few participants and only a few words! Conversations are loud and public! 14-76!

77 Explicit Interfaces Rule 4!! Whenever two modules A and B communicate, this must be obvious from the text of A or B or both Conversation is limited to a few participants and only a few words! Conversations are loud and public! Really important with respect to understandability! 14-77!

78 Explicit Interfaces Rule 5!! Whenever two modules A and B communicate, this must be obvious from the text of A or B or both Conversation is limited to a few participants and only a few words! Conversations are loud and public! Really important with respect to understandability! Worry about procedure parameters as well as shared data! 14-78!

79 Information Hiding Rule (Parnas 72)! The designer of every module must select a subset of properties as the official information about the module, to be made available to client modules 14-79!

80 Information Hiding Rule (Parnas 72) 2! The designer of every module must select a subset of properties as the official information about the module, to be made available to client modules Only some, but not all of the module's properties are public; the rest are secret! 14-80!

81 Information Hiding Rule (Parnas 72) 3! The designer of every module must select a subset of properties as the official information about the module, to be made available to client modules Only some, but not all of the module's properties are public; the rest are secret! Public interface! Public Private & Secret 14-81!

82 Software Construction Principles! Linguistic Modular Units Principle!» Modules must correspond to syntactic language units! 14-82!

83 Software Construction Principles 2! Linguistic Modular Units Principle!» Modules must correspond to syntactic language units! > Example: in C can include files that begin or end with a partial if then else statement! 14-83!

84 Software Construction Principles 3! Linguistic Modular Units Principle!» Modules must correspond to syntactic language units! > Example: in C can include files that begin or end with a partial if then else statement! Self-Documenting Principle!» Module designers should make all information about the module part of the module itself! 14-84!

85 Software Construction Principles 4! Linguistic Modular Units Principle!» Modules must correspond to syntactic language units! > Example: in C can include files that begin or end with a partial if then else statement! Self-Documenting Principle!» Module designers should make all information about the module part of the module itself! > Ideally all program text, diagrams, mathematics and explanations are in one file! 14-85!

86 Software Construction Principles 5! Uniform Access Principle!» All module services should be available through a uniform notation, which does not betray whether they are implemented through storage or computation! 14-86!

87 Software Construction Principles 6! Uniform Access Principle!» All module services should be available through a uniform notation, which does not betray whether they are implemented through storage or computation!» Allow implementer to make space-time tradeoffs! 14-87!

88 Software Construction Principles 7! Uniform Access Principle!» All module services should be available through a uniform notation, which does not betray whether they are implemented through storage or computation!» Allow implementer to make space-time tradeoffs! Single Choice Principle!» Whenever a system must support a set of alternatives, one and only one module in the system should know their exhaustive list! 14-88!

89 Software Construction Principles 8! In real projects A module needs to be both open and closed! 14-89!

90 Software Construction Principles 9! In real projects A module needs to be both open and closed! Open-Closed Principle!» Open! > Available for extension add new features! 14-90!

91 Software Construction Principles 10! Open-Closed Principle!» Open! > Available for extension add new features!» Closed! In real projects A module needs to be both open and closed! > Available for client use stable in spite of extensions! 14-91!

92 Software Construction Principles 11! Open-Closed Principle!» Open! > Available for extension add new features!» Closed! In real projects A module needs to be both open and closed! > Available for client use stable in spite of extensions! We are never done with extensions! 14-92!

93 Software Construction Principles 12! Open-Closed Principle!» Open! > Available for extension add new features!» Closed! In real projects A module needs to be both open and closed! > Available for client use stable in spite of extensions! We are never done with extensions! We must make modules available to others! 14-93!

94 Software Construction Principles 13! In real projects A module needs to be both open and closed! Non OO languages!» Close when stability is reached, reopen when necessary! 14-94!

95 Software Construction Principles 14! In real projects A module needs to be both open and closed! Non OO languages!» Close when stability is reached, reopen when necessary!» But need to reopen all the clients as well! 14-95!

96 Software Construction Principles 13! In real projects A module needs to be both open and closed! Non OO languages!» Close when stability is reached, reopen when necessary!» But need to reopen all the clients too!» Inheritance offers a solution to this problem! 14-96!

97 Software Construction Principles 14! In real projects A module needs to be both open and closed! Non OO languages!» Close when stability is reached, reopen when necessary!» But need to reopen all the clients too!» Inheritance offers a solution to this problem! > But only with multiple inheritance! 14-97!

Modularity Guidelines for design in any programming language

Modularity Guidelines for design in any programming language Modularity Guidelines for design in any programming language 14-1 Modular Software Software constructed as assemblies of small pieces» Each piece encompasses the data and operations necessary to do one

More information

Setting the stage... Key Design Issues. Main purpose - Manage software system complexity by improving software quality factors

Setting the stage... Key Design Issues. Main purpose - Manage software system complexity by improving software quality factors Setting the stage... Dr. Radu Marinescu 1 1946 Key Design Issues Main purpose - Manage software system complexity by...... improving software quality factors... facilitating systematic reuse Dr. Radu Marinescu

More information

LECTURE 3: SOFTWARE DESIGN. Software Engineering Mike Wooldridge

LECTURE 3: SOFTWARE DESIGN. Software Engineering Mike Wooldridge LECTURE 3: SOFTWARE DESIGN Mike Wooldridge 1 Design Computer systems are not monolithic: they are usually composed of multiple, interacting modules. Modularity has long been seen as a key to cheap, high

More information

CAS 703 Software Design

CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Other 1 2 3 4 Other Principle of Least Privilege Principle of Fail-Safe Defaults Principle of

More information

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

Software Design Fundamentals. CSCE Lecture 11-09/27/2016 Software Design Fundamentals CSCE 740 - Lecture 11-09/27/2016 Today s Goals Define design Introduce the design process Overview of design criteria What results in a good design? Gregory Gay CSCE 740 -

More information

Software Design. Levels in Design Process. Design Methodologies. Levels..

Software Design. Levels in Design Process. Design Methodologies. Levels.. Design Software Design Design activity begins with a set of requirements Design done before the system is implemented Design is the intermediate language between requirements and code Moving from problem

More information

Lecturer: Sebastian Coope Ashton Building, Room G.18

Lecturer: Sebastian Coope Ashton Building, Room G.18 Lecturer: Sebastian Coope Ashton Building, Room G.18 E-mail: coopes@liverpool.ac.uk COMP 201 web-page: http://www.csc.liv.ac.uk/~coopes/comp201 http://www.csc.liv.ac.uk/~pbell/comp201.html Lecture 13 Design

More information

Elementary Concepts of Object Class

Elementary Concepts of Object Class Elementary Concepts of Object Class Modeling entities and their behaviour by objects. A class as a specification of objects and as an object factory, computation as message passing/function call between

More information

CHAPTER 5 GENERAL OOP CONCEPTS

CHAPTER 5 GENERAL OOP CONCEPTS CHAPTER 5 GENERAL OOP CONCEPTS EVOLUTION OF SOFTWARE A PROGRAMMING LANGUAGE SHOULD SERVE 2 RELATED PURPOSES : 1. It should provide a vehicle for programmer to specify actions to be executed. 2. It should

More information

Software Architecture Bertrand Meyer. Lecture 3: Language constructs for modularity and information hiding

Software Architecture Bertrand Meyer. Lecture 3: Language constructs for modularity and information hiding Software Architecture Bertrand Meyer Last update: 3 April 2007 ETH Zurich, March-July 2007 Lecture 3: Language constructs for modularity and information hiding Ilinca Ciupa Overview Review of modularity

More information

CS 292 Software Development

CS 292 Software Development CS 292 Software Development and Professional Practice Structured Design and More Design Principles CS 292 Design Principles 1 Unless otherwise expressly stated, all original material of whatever nature

More information

CHAPTER 9 DESIGN ENGINEERING. Overview

CHAPTER 9 DESIGN ENGINEERING. Overview CHAPTER 9 DESIGN ENGINEERING Overview A software design is a meaningful engineering representation of some software product that is to be built. Designers must strive to acquire a repertoire of alternative

More information

Design and Information Hiding

Design and Information Hiding Design and Information Hiding 15-214: Foundations of Software Engineering Jonathan Aldrich Related Reading: D. L. Parnas. On the Criteria To Be Used in Decomposing Systems into Modules. CACM 15(12):1053-1058,

More information

In this Lecture you will Learn: Design Patterns. Patterns vs. Frameworks. Patterns vs. Frameworks

In this Lecture you will Learn: Design Patterns. Patterns vs. Frameworks. Patterns vs. Frameworks In this Lecture you will Learn: Design Patterns Chapter 15 What types of patterns have been identified in software development How to apply design patterns during software development The benefits and

More information

Programming II. Modularity 2017/18

Programming II. Modularity 2017/18 Programming II Modularity 2017/18 Module? Lecture Outline Evolution and history of programming languages Modularity Example History of Programming Programming Paradigms How and why languages develop? How

More information

In his paper of 1972, Parnas proposed the following problem [42]:

In his paper of 1972, Parnas proposed the following problem [42]: another part of its interface. (In fact, Unix pipe and filter systems do this, the file system playing the role of the repository and initialization switches playing the role of control.) Another example

More information

CS560: Formal Modelling and Implementation of Systems (Term II)

CS560: Formal Modelling and Implementation of Systems (Term II) CS560: Formal Modelling and Implementation of Systems (Term II) Software Design A.P.O Riordan, 2009 Email: a.oriordan@cs.ucc.ie Course Webpage: http://www.cs.ucc.ie/~adrian/cs560.html CS560 1 Design Design

More information

PC204. Lecture 5 Programming Methodologies. Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved.

PC204. Lecture 5 Programming Methodologies. Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved. PC204 Lecture 5 Programming Methodologies Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved. Programming Paradigms Software Engineering Exploratory Programming

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecturer: Raman Ramsin Lecture 10: Analysis Packages 1 Analysis Workflow: Packages The analysis workflow consists of the following activities: Architectural analysis Analyze a use

More information

Programming II (CS300)

Programming II (CS300) 1 Programming II (CS300) Chapter 01: Procedural Programming MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Procedural Programming 2 Introduction Procedural Programming: General Overview Procedural Programming:

More information

CS211 Lecture: Design Quality; Cohesion and Coupling; Packages

CS211 Lecture: Design Quality; Cohesion and Coupling; Packages CS211 Lecture: Design Quality; Cohesion and Coupling; Packages Objectives: Last revised October 4, 2004 1. To introduce the notion of design quality, tradeoffs, and some principles of quality design 2.

More information

EINDHOVEN UNIVERSITY OF TECHNOLOGY

EINDHOVEN UNIVERSITY OF TECHNOLOGY EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics & Computer Science Exam Programming Methods, 2IP15, Wednesday 17 April 2013, 09:00 12:00 TU/e THIS IS THE EXAMINER S COPY WITH (POSSIBLY INCOMPLETE)

More information

What are Metrics?! Functions, that assign a precise numerical value to. Detecting Design Problems using Metrics

What are Metrics?! Functions, that assign a precise numerical value to. Detecting Design Problems using Metrics Detecting Design Problems using Metrics What are Metrics?! Functions, that assign a precise numerical value to! Products (Software)! Resources (Staff, Tools, Hardware)! Processes (Software development).

More information

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends!

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends! Requirements Spec. Design Coding and Unit Testing Characteristics of System to be built must match required characteristics (high level) Architecture consistent views Software Engineering Computer Science

More information

Chapter 5 Object-Oriented Programming

Chapter 5 Object-Oriented Programming Chapter 5 Object-Oriented Programming Develop code that implements tight encapsulation, loose coupling, and high cohesion Develop code that demonstrates the use of polymorphism Develop code that declares

More information

Abstraction. Design fundamentals in OO Systems. Fundamental Software Development Principles

Abstraction. Design fundamentals in OO Systems. Fundamental Software Development Principles Abstraction Design fundamentals in OO Systems Tool for abstraction: object Object structure: properties and values for those properties operations to query and update those properties We refer to the collection

More information

Software Metrics and Design Principles. What is Design?

Software Metrics and Design Principles. What is Design? Software Metrics and Design Principles Chapters 5,8 What is Design? Design is the process of creating a plan or blueprint to follow during actual construction Design is a problem-solving activity that

More information

Contemporary Multilevel Machines

Contemporary Multilevel Machines Languages, Levels, Virtual Machines A multilevel machine Contemporary Multilevel Machines A six-level computer. The support method for each level is indicated below the level. The primary difference between

More information

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve? Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going

More information

21) Functional and Modular Design

21) Functional and Modular Design Fakultät Informatik - Institut Software- und Multimediatechnik - Softwaretechnologie Prof. Aßmann - 21) Functional and Modular Design Prof. Dr. U. Aßmann Technische Universität Dresden Institut für Software-

More information

Software Engineering Principles

Software Engineering Principles 1 / 19 Software Engineering Principles Miaoqing Huang University of Arkansas Spring 2010 2 / 19 Outline 1 2 3 Compiler Construction 3 / 19 Outline 1 2 3 Compiler Construction Principles, Methodologies,

More information

Information Hiding and Aspect-Oriented Modeling

Information Hiding and Aspect-Oriented Modeling Information Hiding and Aspect-Oriented Modeling Wisam Al Abed and Jörg Kienzle School of Computer Science, McGill University Montreal, QC H3A2A7, Canada Wisam.Alabed@mail.mcgill.ca, Joerg.Kienzle@mcgill.ca

More information

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

An Introduction to Software Architecture By David Garlan & Mary Shaw 94 IMPORTANT NOTICE TO STUDENTS These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark a class discussion An Introduction to

More information

21) Functional and Modular Design

21) Functional and Modular Design Fakultät Informatik - Institut Software- und Multimediatechnik - Softwaretechnologie Prof. Aßmann - 21) Functional and Modular Design Prof. Dr. U. Aßmann Technische Universität Dresden Institut für Software-

More information

Architectural Decomposition Mei Nagappan

Architectural Decomposition Mei Nagappan Material and some slide content from: - Emerson Murphy-Hill, Reid Holmes - Software Architecture: Foundations, Theory, and Practice - Essential Software Architecture - Steve Easterbrook Architectural Decomposition

More information

Architectural Decomposition Reid Holmes

Architectural Decomposition Reid Holmes Material and some slide content from: - Emerson Murphy-Hill - Software Architecture: Foundations, Theory, and Practice - Essential Software Architecture - Steve Easterbrook Architectural Decomposition

More information

Unit-3 Software Design (Lecture Notes)

Unit-3 Software Design (Lecture Notes) Unit-3 Software Design (Lecture Notes) Prepared by Jay Nanavati, Assistant Professor, SEMCOM Topics Software Design - Introduction Design Principles Module Level concepts Overview of Structured design

More information

Object-Oriented Concepts and Design Principles

Object-Oriented Concepts and Design Principles Object-Oriented Concepts and Design Principles Signature Specifying an object operation or method involves declaring its name, the objects it takes as parameters and its return value. Known as an operation

More information

CMPT Data and Program Organization

CMPT Data and Program Organization CMPT-201 - Data and Program Organization Professor: Bill Havens Office: APSC-10828 Lectures: MWF 2:30pm - 3:20pm Venue: C-9002 WWW: http://www.cs.sfu.ca/coursecentral/201 Office Hours: Monday @3:30pm January

More information

Presenter: Dong hyun Park

Presenter: Dong hyun Park Presenter: 200412325 Dong hyun Park Design as a life cycle activity bonds the requirements to construction Process of breaking down the system into components, defining interfaces and defining components

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Computers and Programs Python Programming, 1/e 1 The Universal Machine What is a computer program? A detailed, step-by-step set of instructions telling a computer what to do.

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecture 14: Design Workflow Department of Computer Engineering Sharif University of Technology 1 UP iterations and workflow Workflows Requirements Analysis Phases Inception Elaboration

More information

Establishing the overall structure of a software system

Establishing the overall structure of a software system Architectural Design Establishing the overall structure of a software system Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13 Slide 1 Objectives To introduce architectural design and

More information

Chapter 8: Class and Method Design

Chapter 8: Class and Method Design Chapter 8: Class and Method Design Objectives Become familiar with coupling, cohesion, and connascence. Be able to specify, restructure, and optimize object designs. Be able to identify the reuse of predefined

More information

CSC 330 Object Oriented Software Design. Software Design Phase

CSC 330 Object Oriented Software Design. Software Design Phase CSC 330 Object Oriented Software Design Software Design Phase 1 Overview Overview Design and abstraction Action-oriented design Data flow analysis Transaction analysis Data-oriented design Object-oriented

More information

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture Objectives Architectural Design To introduce architectural design and to discuss its importance To explain the architectural design decisions that have to be made To introduce three complementary architectural

More information

Exam Questions. Object-Oriented Design, IV1350. Maximum exam score is 100, grade limits are as follows. Score Grade 90 A 80 B 70 C 60 D 50 E

Exam Questions. Object-Oriented Design, IV1350. Maximum exam score is 100, grade limits are as follows. Score Grade 90 A 80 B 70 C 60 D 50 E Object-Oriented Design, IV1350 Maximum exam score is 100, grade limits are as follows. Score Grade 90 A 80 B 70 C 60 D 50 E The exam questions will be a subset of the questions below. The exam may contain

More information

System Design and Modular Programming

System Design and Modular Programming CS3 Programming Methodology Lecture Note D1, 2 November 2000 System Design and Modular Programming System design involves meeting competing requirements and satisfying constraints on the system and the

More information

Desired Characteristics of Modules. Stefan Resmerita, WS2015

Desired Characteristics of Modules. Stefan Resmerita, WS2015 Desired Characteristics of Modules 1 Stable and Understandable Module Interfaces by Information Hiding (I) The design principle Information Hiding goes back to David L. Parnas (1972). Thus, modules are

More information

Obfuscating Transformations. What is Obfuscator? Obfuscation Library. Obfuscation vs. Deobfuscation. Summary

Obfuscating Transformations. What is Obfuscator? Obfuscation Library. Obfuscation vs. Deobfuscation. Summary ? Obfuscating Outline? 1? 2 of Obfuscating 3 Motivation: Java Virtual Machine? difference between Java and others? Most programming languages: Java: Source Code Machine Code Predefined Architecture Java

More information

Sub- PPL Unit-I Class-SE Comp

Sub- PPL Unit-I Class-SE Comp 1. We describe the basic concepts for structuring large programs (encapsulation, interfaces, information hiding) and the mechanisms provided by languages to support it (packaging, separate compilation).

More information

Topic : Object Oriented Design Principles

Topic : Object Oriented Design Principles Topic : Object Oriented Design Principles Software Engineering Faculty of Computing Universiti Teknologi Malaysia Objectives Describe the differences between requirements activities and design activities

More information

Object Orientated Analysis and Design. Benjamin Kenwright

Object Orientated Analysis and Design. Benjamin Kenwright Notation Part 2 Object Orientated Analysis and Design Benjamin Kenwright Outline Review What do we mean by Notation and UML? Types of UML View Continue UML Diagram Types Conclusion and Discussion Summary

More information

Reasoning About Imperative Programs. COS 441 Slides 10

Reasoning About Imperative Programs. COS 441 Slides 10 Reasoning About Imperative Programs COS 441 Slides 10 The last few weeks Agenda reasoning about functional programming It s very simple and very uniform: substitution of equal expressions for equal expressions

More information

Introduction to Object-Oriented Programming

Introduction to Object-Oriented Programming 1/9 Introduction to Object-Oriented Programming Conception et programmation orientées object, B. Meyer, Eyrolles Object-Oriented Software Engineering, T. C. Lethbridge, R. Laganière, McGraw Hill Design

More information

Complexity. Object Orientated Analysis and Design. Benjamin Kenwright

Complexity. Object Orientated Analysis and Design. Benjamin Kenwright Complexity Object Orientated Analysis and Design Benjamin Kenwright Outline Review Object Orientated Programming Concepts (e.g., encapsulation, data abstraction,..) What do we mean by Complexity? How do

More information

Programmazione. Prof. Marco Bertini

Programmazione. Prof. Marco Bertini Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Introduction Why OO Development? Improved structure of software easier to: Understand Maintain Enhance Reusable

More information

Principles of Software Construction: Objects, Design and Concurrency. Introduction to Design. toad

Principles of Software Construction: Objects, Design and Concurrency. Introduction to Design. toad Principles of Software Construction: Objects, Design and Concurrency Introduction to Design 15-214 toad Christian Kästner Charlie Garrod School of Computer Science 2012-14 C Kästner, C Garrod, J Aldrich,

More information

301AA - Advanced Programming [AP-2017]

301AA - Advanced Programming [AP-2017] 301AA - Advanced Programming [AP-2017] Lecturer: Andrea Corradini andrea@di.unipi.it Tutor: Lillo GalleBa galleba@di.unipi.it Department of Computer Science, Pisa Academic Year 2017/18 AP-2017-07: So%ware

More information

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE Dave Clarke 1 THIS LECTURE At the end of this lecture you will know notations for expressing software architecture the design principles of cohesion

More information

Classes and Objects. Object Orientated Analysis and Design. Benjamin Kenwright

Classes and Objects. Object Orientated Analysis and Design. Benjamin Kenwright Classes and Objects Object Orientated Analysis and Design Benjamin Kenwright Outline Review Previous Weeks Object Model, Complexity,.. What do we mean by Classes and Objects? Summary/Discussion Review

More information

Computational Expression

Computational Expression Computational Expression String Class Janyl Jumadinova 24 September, 2018 Janyl Jumadinova Computational Expression 24 September, 2018 1 / 16 Data Types: Review Java has two categories of data: - primitive

More information

Lecturer: William W.Y. Hsu. Programming Languages

Lecturer: William W.Y. Hsu. Programming Languages Lecturer: William W.Y. Hsu Programming Languages Chapter 9 Data Abstraction and Object Orientation 3 Object-Oriented Programming Control or PROCESS abstraction is a very old idea (subroutines!), though

More information

MCQS for Midterm cs504 Combined by Anees Ahmad

MCQS for Midterm cs504 Combined by Anees Ahmad MCQS for Midterm cs504 Combined by Anees Ahmad The best way to conduct a requirements validation review is to examine the system model for errors have the customer look over the requirements send them

More information

Today's Agenda. References. Open Closed Principle. CS 247: Software Engineering Principles. Object-Oriented Design Principles

Today's Agenda. References. Open Closed Principle. CS 247: Software Engineering Principles. Object-Oriented Design Principles CS 247: Software Engineering Principles Reading: none Object-Oriented Design Principles Today's Agenda Object-Oriented Design Principles - characteristics, properties, and advice for making decisions that

More information

Java and Software Design

Java and Software Design Introduction to Java and Software Design Jindal Consulting Chapter 1 Overview of Programming and Problem Solving Slides by Varun Jindal 1 Chapter 1 Topics Computer Programming Programming Life-Cycle Phases

More information

Design Engineering. Overview

Design Engineering. Overview Design Engineering Overview What is software design? How to do it? Principles, concepts, and practices High-level design Low-level design N. Meng, B. Ryder 2 1 Design Engineering The process of making

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Object Oriented Programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 23, 2010 G. Lipari (Scuola Superiore

More information

Architectural Decomposition & Representations Reid Holmes

Architectural Decomposition & Representations Reid Holmes Architectural Decomposition & Representations Reid Holmes What is SW architecture? Definition: Blueprint for construction and evolution. Encompasses: Structure Behaviour The set of principal design decisions

More information

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer 1. The term is used to describe a programming approach based on classes and objects is (A) OOP (B) POP (C) ADT (D) SOP

More information

Design Patterns. Gunnar Gotshalks A4-1

Design Patterns. Gunnar Gotshalks A4-1 Design Patterns A4-1 On Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every problem

More information

Chapter 2 Basic Principles of the Object-Oriented Paradigm 2.1 Abstraction

Chapter 2 Basic Principles of the Object-Oriented Paradigm 2.1 Abstraction Chapter 2 Basic Principles of the Object-Oriented Paradigm 2.1 Abstraction One of the most appreciated advantages of object-oriented versus other modern programming paradigms is the direct support for

More information

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. Object Oriented Programming

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. Object Oriented Programming BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT Object Oriented Programming Examiner s Report March 2017 A1. a) Explain what is meant by the following terms:

More information

Introduction to System Design

Introduction to System Design Introduction to System Design Software Requirements and Design CITS 4401 Lecture 8 System Design is a creative process no cook book solutions goal driven we create a design for solving some problem constraint

More information

Object-Oriented and Classical Software Engineering DESIGN 11/12/2017. CET/CSC490 Software Engineering Design CHAPTER 14. Stephen R. Schach.

Object-Oriented and Classical Software Engineering DESIGN 11/12/2017. CET/CSC490 Software Engineering Design CHAPTER 14. Stephen R. Schach. Slide 14.1 CHAPTER 14 Slide 14.2 Object-Oriented and Classical Software Engineering DESIGN Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach Overview Slide 14.3 Overview (contd) Slide 14.4 and abstraction

More information

The object-oriented approach goes a step further by providing tools for the programmer to represent elements in the problem space.

The object-oriented approach goes a step further by providing tools for the programmer to represent elements in the problem space. 1 All programming languages provide abstractions. Assembly language is a small abstraction of the underlying machine. Many imperative languages (FORTRAN, BASIC, and C) are abstractions of assembly language.

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline

More information

Design Process Overview. At Each Level of Abstraction. Design Phases. Design Phases James M. Bieman

Design Process Overview. At Each Level of Abstraction. Design Phases. Design Phases James M. Bieman CS314, Colorado State University Software Engineering Notes 4: Principles of Design and Architecture for OO Software Focus: Determining the Overall Structure of a Software System Describes the process

More information

1: Introduction to Object (1)

1: Introduction to Object (1) 1: Introduction to Object (1) 김동원 2003.01.20 Overview (1) The progress of abstraction Smalltalk Class & Object Interface The hidden implementation Reusing the implementation Inheritance: Reusing the interface

More information

Object-Oriented and Classical Software Engineering

Object-Oriented and Classical Software Engineering Slide 8.1 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach srs@vuse.vanderbilt.edu CHAPTER 8 Slide 8.2 REUSABILITY AND PORTABILITY Overview Slide

More information

Lecture 4: Design Concepts For Responsibility- Driven Design Kenneth M. Anderson January 20, 2005

Lecture 4: Design Concepts For Responsibility- Driven Design Kenneth M. Anderson January 20, 2005 Lecture 4: Design Concepts For Responsibility- Driven Design Kenneth M. Anderson 1 of 25 Introduction Chapter 1 of Object Design covers topics that aid understanding of Responsibility-Driven Design Object

More information

Session 4b: Review of Program Quality

Session 4b: Review of Program Quality Session 4b: Review of Program Quality What makes one program "better" than another? COMP 170 -- Fall, 2013 Mr. Weisert What is a good program? Suppose we give the same assignment to two programmers (or

More information

Objectives for this class meeting. 1. Conduct review of core concepts concerning contracts and pre/post conditions

Objectives for this class meeting. 1. Conduct review of core concepts concerning contracts and pre/post conditions CSE1720 Click to edit Master Week text 01, styles Lecture 02 Second level Third level Fourth level Fifth level Winter 2015! Thursday, Jan 8, 2015 1 Objectives for this class meeting 1. Conduct review of

More information

Lecture 20: Implementation () / 33

Lecture 20: Implementation () / 33 Lecture 20: Implementation 15.07.2013 () 15.07.2013 1 / 33 Contents Implementation Implementation Principles Example: Eight Queens by Refinement () 15.07.2013 2 / 33 Implementation Input: software architecture,

More information

Programming Languages & Paradigms PROP HT Abstraction & Modularity. Inheritance vs. delegation, method vs. message. Modularity, cont d.

Programming Languages & Paradigms PROP HT Abstraction & Modularity. Inheritance vs. delegation, method vs. message. Modularity, cont d. Programming Languages & Paradigms PROP HT 2011 Abstraction & Modularity Lecture 6 Inheritance vs. delegation, method vs. message Beatrice Åkerblom beatrice@dsv.su.se 2 Modularity Modularity, cont d. Modular

More information

17.11 Bean Rules persistent

17.11 Bean Rules persistent 17.10 Java Beans Java beans are a framework for creating components in Java. AWT and Swing packages are built within this framework Made to fit in with graphic development environments such as Jbuilder

More information

Towards a Memory-Efficient Knapsack DP Algorithm

Towards a Memory-Efficient Knapsack DP Algorithm Towards a Memory-Efficient Knapsack DP Algorithm Sanjay Rajopadhye The 0/1 knapsack problem (0/1KP) is a classic problem that arises in computer science. The Wikipedia entry http://en.wikipedia.org/wiki/knapsack_problem

More information

Software Architecture

Software Architecture Software Architecture Lecture 5 Call-Return Systems Rob Pettit George Mason University last class data flow data flow styles batch sequential pipe & filter process control! process control! looping structure

More information

CS 575: Software Design

CS 575: Software Design CS 575: Software Design Introduction 1 Software Design A software design is a precise description of a system, using a variety of different perspectives Structural Behavioral Packaging Requirements, Test/Validation

More information

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve? Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going

More information

Modules. Cardelli, 1996

Modules. Cardelli, 1996 SDI LC90 E Dot Inc Modules Program modularization arose from the necessity of splitting large programs into fragments in order to compile them.... It was soon realized that modularization had great advantages

More information

Welcome to Design Patterns! For syllabus, course specifics, assignments, etc., please see Canvas

Welcome to Design Patterns! For syllabus, course specifics, assignments, etc., please see Canvas Welcome to Design Patterns! For syllabus, course specifics, assignments, etc., please see Canvas What is this class about? While this class is called Design Patterns, there are many other items of critical

More information

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D. Software Design Patterns Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University J. Maletic 1 Background 1 Search for recurring successful designs emergent designs from practice

More information

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered Topics covered Chapter 6 Architectural Design Architectural design decisions Architectural views Architectural patterns Application architectures Lecture 1 1 2 Software architecture The design process

More information

PRINCIPLES OF SOFTWARE DESIGN

PRINCIPLES OF SOFTWARE DESIGN F. Tip and M. Weintraub PRINCIPLES OF SOFTWARE DESIGN Thanks go to Andreas Zeller for allowing incorporation of his materials THE CHALLENGE 1. Software may live much longer than expected 2. Software must

More information

Scala, Your Next Programming Language

Scala, Your Next Programming Language Scala, Your Next Programming Language (or if it is good enough for Twitter, it is good enough for me) WORLDCOMP 2011 By Dr. Mark C. Lewis Trinity University Disclaimer I am writing a Scala textbook that

More information

A few more things about Agile and SE. Could help in interviews, but don t try to bluff your way through

A few more things about Agile and SE. Could help in interviews, but don t try to bluff your way through A few more things about Agile and SE Could help in interviews, but don t try to bluff your way through 1 Refactoring How to do it, where it fits in http://www.cse.ohio-state.edu/~crawfis/cse3902/index.htm

More information

Intro to: Design Principles

Intro to: Design Principles Intro to: Design Principles Pragmatic Programmer: Eliminate Effects Between Unrelated Things design components that are: self-contained, independent, and have a single, well-defined purpose Software Design

More information

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005.

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005. Object-Oriented Modeling Using UML CS151 Chris Pollett Aug. 29, 2005. Outline Objects and Classes Modeling Relationships and Structures Some Terms and Concepts Objects and classes are fundamental to OO

More information

Introduction to Object Oriented Programming. (Hebrew University, CS / Spring 2012 )

Introduction to Object Oriented Programming. (Hebrew University, CS / Spring 2012 ) Introduction to Object Oriented Programming (Hebrew University, CS 67125 / Spring 2012 ) Overview There are many important Object Oriented Design (OOD) principles Today we'll focus on several basic principles

More information