Advanced Object Oriented Design Laboratory.

Size: px
Start display at page:

Download "Advanced Object Oriented Design Laboratory."

Transcription

1 Advanced Object Oriented Design Laboratory

2 Message Chains

3 Law of Demeter Principle Object- Oriented style rule for builing systems (Dem et er Research Group 1987, published 1988) General Form: Each unit should only use a limited set of other units: only units closely related to the current unit Don t talk to strangers

4 Law of Demeter Principle cont. friends

5 Object Form of Law of Demeter Principle unit = method Closely related: 3. A parameter of the method 4. The enclosing object (this). 5. A static object. 6. An immediate part object (computed or stored): a. An object that the enclosing method returns b. At tributes of the enclosing object c. An element of a collection which is an attribute of the enclosing object 7. An object created within the method.

6 Object Form of Law of Demeter Principle unit = method Closely related: 3. A parameter of the method 4. The enclosing object (this). 5. A static object. public void dosth(object obj) { System.out.println(obj.toString()); this.dosth( LoD );

7 Object Form of Law of Demeter Principle 1. An immediate part object (computed or stored): a. An object that the enclosing method returns public class SthClass {... public Object getobj() { return new Object(); public void dosth() { System.out.println(getObj().toString());

8 Object Form of Law of Demeter Principle 1. An immediate part object (computed or stored): a. At tributes of the enclosing object b. An element of a collection which is an attribute of the enclosing object public class SthClass { public List collection;... public void dosth() { Object elem = collection.get(0); System.out.println(elem.toString());

9 Object Form of Law of Demeter Principle 1. An object created within the method. public void dosth() { Object obj = new Object(); System.out.println(obj.toString());

10 Law of Demeter Principle - Motivation Programmers can only keep a limited set of items in short- term memory and it is easier to keep them in memory if they are closely related Hiding the structure of navigation causes less changes to client. Reusability of m ethods (low coupling)

11 Law of Demeter Principle The Strong Law of Demeter The instance variables make up a given class. Inherited instance variable types may not be passed messages. The Weak Law of Demeter The instance variables and any instance variables inherited from other classes make up a given class

12 What is Message Chains? Message Chains is a violation of the Law of Demeter Principle

13 example public class Person { private Department department; public void setdepartment(department department){ this.department = department; public Department getdepartment() { return department;

14 example cont. public class Department { public Department(Person manager) { this.manager = manager; public Person getmanager() { return manager;

15 example cont Person manager = john.getdepartment().getmanager(); Violation of the Law of Demeter

16 example public class Person { private Department department; public void setdepartment(department department){ this.department = department; public Department getdepartment() { return department; public Person getmanager() { return department.getmanager(); Extract to method Move method Hide delegate Correct

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

Lecture: Modular Design

Lecture: Modular Design Software Engineering Lecture: Modular Design Thomas Fritz Many thanks to Philippe Beaudoin, Gail Murphy, David Shepherd, Neil Ernst and Meghan Allen Reading! For next lecture: (all required) Composite

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

Object-Oriented Design I

Object-Oriented Design I Object-Oriented Design I SWEN-261 Introduction to Software Engineering Department of Software Engineering Rochester Institute of Technology Single responsibility High cohesion Information expert Low coupling

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

Refactoring Practice: How it is and How it Should be Supported

Refactoring Practice: How it is and How it Should be Supported Refactoring Practice: How it is and How it Should be Supported Zhenchang Xing and EleniStroulia Presented by: Sultan Almaghthawi 1 Outline Main Idea Related Works/Literature Alignment Overview of the Case

More information

Object Oriented Metrics. Impact on Software Quality

Object Oriented Metrics. Impact on Software Quality Object Oriented Metrics Impact on Software Quality Classic metrics Lines Of Code Function points Complexity Code coverage - testing Maintainability Index discussed later Lines of Code KLOC = 1000 Lines

More information

CMPS 115 Winter 04. Class #10 (2004/02/05) Changes/Review Programming Paradigms Principles of OOD <break> Design Patterns

CMPS 115 Winter 04. Class #10 (2004/02/05) Changes/Review Programming Paradigms Principles of OOD <break> Design Patterns CMPS 115 Winter 04 Class #10 (2004/02/05) Changes/Review Programming Paradigms Principles of OOD Design Patterns Changes & Lecture 9 Takeaway Changes/Notices 2/26 may be guest after all, on design-with-frameworks

More information

Object-Oriented Design II - GRASP

Object-Oriented Design II - GRASP Object-Oriented Design II - GRASP SWEN-610 Foundations of Software Engineering Department of Software Engineering Rochester Institute of Technology Controller Creator Indirection Information expert High

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

Classes. Logical method to organise data and functions in a same structure. Also known as abstract data type (ADT).

Classes. Logical method to organise data and functions in a same structure. Also known as abstract data type (ADT). UNITII Classes Logical method to organise data and functions in a same structure. Also known as abstract data type (ADT). It s a User Defined Data-type. The Data declared in a Class are called Data- Members

More information

CPSC 310: Sample Final Exam Study Questions 2014S1 (These are in addition to the Study Questions listed at the end of some lectures)

CPSC 310: Sample Final Exam Study Questions 2014S1 (These are in addition to the Study Questions listed at the end of some lectures) CPSC 310: Sample Final Exam Study Questions 2014S1 (These are in addition to the Study Questions listed at the end of some lectures) 1. Select the best functional requirement from the list of requirements

More information

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004 Facade and Adapter Comp-303 : Programming Techniques Lecture 19 Alexandre Denault Computer Science McGill University Winter 2004 March 23, 2004 Lecture 19 Comp 303 : Facade and Adapter Page 1 Last lecture...

More information

Aspect Oriented Programming

Aspect Oriented Programming 1 Aspect Oriented Programming Programming Languages Seminar Presenter: Barış Aktemur University of Illinois 18 Feb. 2004 Mostly taken from Bedir Tekinerdogan s slides Outline Introduction Problems Terminology

More information

1 Software Architecture

1 Software Architecture Some buzzwords and acronyms for today Software architecture Design pattern Separation of concerns Single responsibility principle Keep it simple, stupid (KISS) Don t repeat yourself (DRY) Don t talk to

More information

Maintainable Software. Software Engineering Andreas Zeller, Saarland University

Maintainable Software. Software Engineering Andreas Zeller, Saarland University Maintainable Software Software Engineering Andreas Zeller, Saarland University The Challenge Software may live much longer than expected Software must be continuously adapted to a changing environment

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

GRASP Design Patterns A.A. 2018/2019

GRASP Design Patterns A.A. 2018/2019 GRASP Design Patterns A.A. 2018/2019 Objectives Introducing design patterns Introduzione ai design pattern Designing objects and responsibilities GRASP design patterns A long corridor A passage room Does

More information

Application Architectures, Design Patterns

Application Architectures, Design Patterns Application Architectures, Design Patterns Martin Ledvinka martin.ledvinka@fel.cvut.cz Winter Term 2017 Martin Ledvinka (martin.ledvinka@fel.cvut.cz) Application Architectures, Design Patterns Winter Term

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

Principles of Object-Oriented Design

Principles of Object-Oriented Design Principles of Object-Oriented Design Part II 1 The Law of Demeter Any object receiving a message in a given method must be one of a restricted set of objects. 1. Strict Form: Every supplier class or object

More information

Determining responsibilities. What object should be responsible for what behavior?

Determining responsibilities. What object should be responsible for what behavior? Determining responsibilities What object should be responsible for what behavior? This is a design discussion for Sprint 2 of the Cave game Analysing and designing classes In Sprint 1, we designed the

More information

Laboratorio di Tecnologie dell'informazione

Laboratorio di Tecnologie dell'informazione Laboratorio di Tecnologie dell'informazione Ing. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Exceptions What are exceptions? Exceptions are a mechanism for handling an error

More information

2009 Shawn A. Bohner. Shawn Bohner Office: Moench Room F212 Phone: (812)

2009 Shawn A. Bohner. Shawn Bohner Office: Moench Room F212 Phone: (812) 2009 Shawn A. Bohner Shawn Bohner Office: Moench Room F212 Phone: (812) 877-8685 Email: bohner@rose-hulman.edu GRASP II And Furthermore Polymorphism Indirection Pure Fabrication Protected Variations 2

More information

CS 520 Theory and Practice of Software Engineering Fall 2017

CS 520 Theory and Practice of Software Engineering Fall 2017 CS 520 Theory and Practice of Software Engineering Fall 2017 OO design principles September 14, 2017 Today Code review and (re)design of an MVC application OO design principles Information hiding (and

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

CS 520 Theory and Practice of Software Engineering Fall 2018

CS 520 Theory and Practice of Software Engineering Fall 2018 Today CS 520 Theory and Practice of Software Engineering Fall 2018 Object Oriented (OO) Design Principles September 13, 2018 Code review and (re)design of an MVC application (and encapsulation) Polymorphism

More information

Practice Problems. Review, with SOME solutions

Practice Problems. Review, with SOME solutions Practice Problems Review, with SOME solutions Multiple Choice 1. Select the best functional requirement from the list of requirements below. a) A warning dialog should pop up if the student s assignment

More information

INTERNAL ASSESSMENT TEST III Answer Schema

INTERNAL ASSESSMENT TEST III Answer Schema INTERNAL ASSESSMENT TEST III Answer Schema Subject& Code: Object-Oriented Modeling and Design (15CS551) Sem: V ISE (A & B) Q. No. Questions Marks 1. a. Ans Explain the steps or iterations involved in object

More information

6 The MVC model. Main concepts to be covered. Pattern structure. Using design patterns. Design pattern: Observer. Observers

6 The MVC model. Main concepts to be covered. Pattern structure. Using design patterns. Design pattern: Observer. Observers Main concepts to be covered 6 The MVC model Design patterns The design pattern The architecture Using design patterns Inter-class relationships are important, and can be complex. Some relationship recur

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Department of Computer Engineering Lecture 12: Object-Oriented Principles Sharif University of Technology 1 Open Closed Principle (OCP) Classes should be open for extension but closed

More information

CS 320 Introduction to Software Engineering Spring March 06, 2017

CS 320 Introduction to Software Engineering Spring March 06, 2017 CS 320 Introduction to Software Engineering Spring 2017 March 06, 2017 Recap: types of Polymorphism Recap: types of Polymorphism Ad-hoc polymorphism (e.g., operator overloading) a + b String vs. int, double,

More information

Design Patterns Reid Holmes

Design Patterns Reid Holmes Material and some slide content from: - Head First Design Patterns Book - GoF Design Patterns Book Design Patterns Reid Holmes GoF design patterns $ %!!!! $ "! # & Pattern vocabulary Shared vocabulary

More information

Java EE Architecture, Part Three. Java EE architecture, part three 1(57)

Java EE Architecture, Part Three. Java EE architecture, part three 1(57) Java EE Architecture, Part Three Java EE architecture, part three 1(57) Content Requirements on the Integration layer The Database Access Object, DAO Pattern Frameworks for the Integration layer Java EE

More information

Object interconnections

Object interconnections Object interconnections 2 Roadmap In this chapter we move up a level of abstraction, and consider collections of objects working together Our focus will be on how objects are connected to each other, and

More information

Object-oriented metrics 1

Object-oriented metrics 1 Advanced Object-Oriented Design Lecture 4 Object-oriented metrics Bartosz Walter 1. Motivation and goals 2. omplexity metrics 3. Metrics for Object-Oriented Design (MOOD suite)

More information

Four More GRASP Principles CSSE 574: Session 5, Part 2

Four More GRASP Principles CSSE 574: Session 5, Part 2 Four More GRASP Principles CSSE 574: Session 5, Part 2 Steve Chenoweth Phone: Office (812) 877-8974 Cell (937) 657-3885 Email: chenowet@rose-hulman.edu GRASP II And Furthermore Polymorphism Indirection

More information

Refining the Observer Pattern: The Middle Observer Pattern

Refining the Observer Pattern: The Middle Observer Pattern Refining the Observer Pattern: The Middle Observer Pattern Pablo Iaría - iariap@sol.info.unlp.edu.ar Ulises Chesini - uliche@sol.info.unlp.edu.ar Abstract The refinement presented in this paper incorporates

More information

OO Design Principles

OO Design Principles OO Design Principles Software Architecture VO (706.706) Roman Kern Institute for Interactive Systems and Data Science, TU Graz 2018-10-10 Roman Kern (ISDS, TU Graz) OO Design Principles 2018-10-10 1 /

More information

Common mistakes and Basic Design Principles. David Rabinowitz

Common mistakes and Basic Design Principles. David Rabinowitz Common mistakes and Basic Design Principles David Rabinowitz Common Mistakes Repeated often Don t you make them! How to recognize the danger signals? May 28, 2008 Object Oriented Design Course 2 Danger

More information

Tuesday, October 4. Announcements

Tuesday, October 4. Announcements Tuesday, October 4 Announcements www.singularsource.net Donate to my short story contest UCI Delta Sigma Pi Accepts business and ICS students See Facebook page for details Slide 2 1 Design Patterns Design

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 10 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2016 Last Time Project Planning Non-agile Agile Refactoring Contents Basic Principles

More information

Inheritance Modes. Controlling Inheritance 1

Inheritance Modes. Controlling Inheritance 1 Inheritance Modes Controlling Inheritance 1 When deriving a class D from a base class B, we may specify that access to the base class is any of the following: public, protected, private. The base class

More information

CPSC 427: Object-Oriented Programming

CPSC 427: Object-Oriented Programming CPSC 427: Object-Oriented Programming Michael J. Fischer Lecture 13 October 15, 2018 CPSC 427, Lecture 13, October 15, 2018 1/18 CPSC 427, Lecture 13, October 15, 2018 2/18 CPSC 427, Lecture 13, October

More information

Software Engineering

Software Engineering Software Engineering Lecture 13: Testing and Debugging Testing Peter Thiemann University of Freiburg, Germany SS 2014 Recap Recap Testing detect the presence of bugs by observing failures Recap Testing

More information

Non-Blocking Inter-Partition Communication with Wait-Free Pair Transactions

Non-Blocking Inter-Partition Communication with Wait-Free Pair Transactions Non-Blocking Inter-Partition Communication with Wait-Free Pair Transactions Ethan Blanton and Lukasz Ziarek Fiji Systems, Inc. October 10 th, 2013 WFPT Overview Wait-Free Pair Transactions A communication

More information

Restructuring. What is restructuring? Tudor Gîrba Reengineering life cycle. What? forward engineering. reverse engineering

Restructuring. What is restructuring? Tudor Gîrba   Reengineering life cycle. What? forward engineering. reverse engineering Restructuring Tudor Gîrba www.tudorgirba.com Reengineering life cycle Reengineering... is the examination and alteration of a subject system to reconstitute it in a new form and the subsequent implementation

More information

Principles of Software Construction: Objects, Design, and Concurrency

Principles of Software Construction: Objects, Design, and Concurrency Principles of Software Construction: Objects, Design, and Concurrency Designing (sub-) systems A formal design process Charlie Garrod Michael Hilton School of Computer Science 1 Administrivia Optional

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

Magento Technical Guidelines

Magento Technical Guidelines Magento Technical Guidelines Eugene Shakhsuvarov, Software Engineer @ Magento 2018 Magento, Inc. Page 1 Magento 2 Technical Guidelines Document which describes the desired technical state of Magento 2

More information

Software Engineering Testing and Debugging Testing

Software Engineering Testing and Debugging Testing Software Engineering Testing and Debugging Testing Prof. Dr. Peter Thiemann Universitt Freiburg 08.06.2011 Recap Testing detect the presence of bugs by observing failures Debugging find the bug causing

More information

CS304 Object Oriented Programming Final Term

CS304 Object Oriented Programming Final Term 1. Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those common behaviours and attributes? Generalization (pg 29) Sub-typing

More information

Software Eningeering. Lecture 9 Design Patterns 2

Software Eningeering. Lecture 9 Design Patterns 2 Software Eningeering Lecture 9 Design Patterns 2 Patterns covered Creational Abstract Factory, Builder, Factory Method, Prototype, Singleton Structural Adapter, Bridge, Composite, Decorator, Facade, Flyweight,

More information

Clean Code Why Clean Code matters

Clean Code Why Clean Code matters Silicon Valley Code Camp Clean Code Why Clean Code matters Foothill College, October 9 nd 2011 Theo Jungeblut Senior Software Developer at Omnicell Inc. in Mountain View Has been designing and implementing.net

More information

02291: System Integration

02291: System Integration 02291: System Integration Hubert Baumeister hub@imm.dtu.dk Spring 2011 Contents 1 Recap 1 2 More UML Diagrams 2 2.1 Object Diagrams........................................... 2 2.2 Communication Diagrams......................................

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

Design Patterns Lecture 2

Design Patterns Lecture 2 Design Patterns Lecture 2 Josef Hallberg josef.hallberg@ltu.se 1 Patterns covered Creational Abstract Factory, Builder, Factory Method, Prototype, Singleton Structural Adapter, Bridge, Composite, Decorator,

More information

Principles of Software Design. Software Engineering Alessio Gambi Saarland University

Principles of Software Design. Software Engineering Alessio Gambi Saarland University Principles of Software Design Software Engineering Alessio Gambi Saarland University The Challenge Software may live much longer than expected Software must be continuously adapted to a changing environment

More information

Comp151. Inheritance: Introduction

Comp151. Inheritance: Introduction Comp151 Inheritance: Introduction Example: University Admin Info Let s implement a system for maintaining university administration information. Teacher and Student are two completely separate classes.

More information

Accessibility (1A) Young Won Lim 8/22/13

Accessibility (1A) Young Won Lim 8/22/13 Accessibility (1A) Copyright (c) 2011-2013 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

Inheritance Inheritance :

Inheritance Inheritance : : is the process of creating a new class(derived classes) from existing classes( ase lasses). The derived classes not only inherit the capabilities of the base class abut also can add new features of their

More information

Design Patterns. An introduction

Design Patterns. An introduction Design Patterns An introduction Introduction Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. Your design should be specific to the problem at

More information

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference 2015-2016 Visitor See lecture on design patterns Design of Software Systems 2 Composite See lecture on design patterns

More information

5. (a) What is secondary storage? How does it differ from a primary storage? (b) Explain the functions of (i) cache memory (ii) Register

5. (a) What is secondary storage? How does it differ from a primary storage? (b) Explain the functions of (i) cache memory (ii) Register General Concepts 1. (a) What are combinational circuits? (b) Perform the following: (i) Convert (0.5625) 10 = ( ) 2 (ii) (010010) 2 (100011) 2 = ( ) 2 2. (a) Using truth table prove that A B= A+ B (b)

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 11 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2017 Recap I Software Development Processes (cont.) I Project Planning I Design

More information

Study Guide to Exam 2

Study Guide to Exam 2 YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 427a: Object-Oriented Programming Handout #10 Professor M. J. Fischer November 27, 2011 Study Guide to Exam 2 This exam covers the entire course, but

More information

9/19/2018 Programming Data Structures. Polymorphism And Abstract

9/19/2018 Programming Data Structures. Polymorphism And Abstract 9/19/2018 Programming Data Structures Polymorphism And Abstract 1 In-class assignment: deadline noon!! 2 Overview: 4 main concepts in Object-Oriented Encapsulation in Java is a mechanism of wrapping the

More information

Object Oriented Programming

Object Oriented Programming Object Oriented Programming Luis Pedro Coelho On the web: http://luispedro.org On twitter: @luispedrocoelho European Molecular Biology Laboratory June 16, 2014 Luis Pedro Coelho (luis@luispedro.org) (EMBL)

More information

Microsoft Word - Templates

Microsoft Word - Templates Microsoft Word - Templates Templates & Styles. Microsoft Word come will a large amount of predefined templates designed for you to use, it is also possible to download additional templates from web sites

More information

Design Patterns (Composite, Iterator)

Design Patterns (Composite, Iterator) CS 246: Software Abstraction and Specification Lecture 17 Design Patterns (Composite, Iterator) Reading: Head First Design Patterns U Waterloo CS246se (Spring 2011) p.1/30 Today's Agenda Design patterns:

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

Introduction to Architecture. Introduction to Architecture 1

Introduction to Architecture. Introduction to Architecture 1 Introduction to Architecture Introduction to Architecture 1 Content What is architecture? Motivation for architecture Non-functional requirements Introduction to Architecture 2 What is architecture? The

More information

C++ & Object Oriented Programming Concepts The procedural programming is the standard approach used in many traditional computer languages such as BASIC, C, FORTRAN and PASCAL. The procedural programming

More information

Topics. Software Process. Agile. Requirements. Basic Design. Modular Design. Design Patterns. Testing. Quality. Refactoring.

Topics. Software Process. Agile. Requirements. Basic Design. Modular Design. Design Patterns. Testing. Quality. Refactoring. CS310 - REVIEW Topics Process Agile Requirements Basic Design Modular Design Design Patterns Testing Quality Refactoring UI Design How these things relate Process describe benefits of using a software

More information

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

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

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns?

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns? What is a Pattern? Lecture 40: Design Patterns CS 62 Fall 2017 Kim Bruce & Alexandra Papoutsaki "Each pattern describes a problem which occurs over and over again in our environment, and then describes

More information

Department of Computer science and Engineering Sub. Name: Object oriented programming and data structures Sub. Code: EC6301 Sem/Class: III/II-ECE Staff name: M.Kavipriya Two Mark Questions UNIT-1 1. List

More information

Scanner - A tool for collecting object oriented software metrics from C++ class definitions

Scanner - A tool for collecting object oriented software metrics from C++ class definitions Scanner - A tool for collecting object oriented software metrics from C++ class definitions Murray Wong June 2, 1998 1 Introduction This paper presents Scanner, a tool for automating the collection of

More information

18.1 Definitions and General OO Principles

18.1 Definitions and General OO Principles Chapter 18: Design Patterns Design patterns are elegant, adaptable, and reusable solutions to everyday software development problems. Each pattern includes a description of a commonly occuring type of

More information

FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING

FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING Question No: 1 ( Marks: 1 ) - Please choose one Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete,

More information

Lecture 13: Design Patterns

Lecture 13: Design Patterns 1 Lecture 13: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2005 2 Pattern Resources Pattern Languages of Programming Technical conference on Patterns

More information

COURSE 2 DESIGN PATTERNS

COURSE 2 DESIGN PATTERNS COURSE 2 DESIGN PATTERNS CONTENT Fundamental principles of OOP Encapsulation Inheritance Abstractisation Polymorphism [Exception Handling] Fundamental Patterns Inheritance Delegation Interface Abstract

More information

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository Pattern Resources Lecture 25: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Pattern Languages of Programming Technical conference on Patterns

More information

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6 Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6 Some Terms: Architecture the manner in which the components of a computer

More information

The Stepping Stones. to Object-Oriented Design and Programming. Karl J. Lieberherr. Northeastern University, College of Computer Science

The Stepping Stones. to Object-Oriented Design and Programming. Karl J. Lieberherr. Northeastern University, College of Computer Science The Stepping Stones to Object-Oriented Design and Programming Karl J. Lieberherr Northeastern University, College of Computer Science Cullinane Hall, 360 Huntington Ave., Boston MA 02115 lieber@corwin.ccs.northeastern.edu

More information

Software Design and Analysis for Engineers

Software Design and Analysis for Engineers Software Design and Analysis for Engineers by Dr. Lesley Shannon Email: lshannon@ensc.sfu.ca Course Website: http://www.ensc.sfu.ca/~lshannon/courses/ensc251 Simon Fraser University Slide Set: 2 Date:

More information

25.1 Introduction Façade Design Pattern Identification Problem Structure Participants...

25.1 Introduction Façade Design Pattern Identification Problem Structure Participants... Department of Computer Science Tackling Design Patterns Chapter 25: Façade Design Pattern Copyright c 2016 by Linda Marshall and Vreda Pieterse. All rights reserved. Contents 25.1 Introduction.................................

More information

The Challenge. Principles of Software Design

The Challenge. Principles of Software Design Squircle {2 * k.radius = r.a = r.b +set_a() +resize(factor:double) Shape -position: Point = (10, 10) +area(): double +draw() +set_position(position: Point) +get_position(): Point Circle -radius: double

More information

Clean

Clean Clean Code @mariosangiorgio Why? Goals Readable, maintainable and extendable code Meaningful names A simple example public List getthem() { List list1 = new ArrayList(); for (int[]

More information

Application Frameworks Function Oriented Object Oriented Service Oriented

Application Frameworks Function Oriented Object Oriented Service Oriented Application Frameworks Function Oriented Object Oriented Service Oriented By Prabhu Shanmugam Software developers need to have a good memory, be very good at learning, and be great at forgetting! Sometimes

More information

Object Oriented Design

Object Oriented Design Object Oriented Design Lecture 3: Introduction to C++ (Continue) Examples using declarations that eliminate the need to repeat the std:: prefix 1 Examples using namespace std; enables a program to use

More information

CPSC 310 Software Engineering. Lecture 11. Design Patterns

CPSC 310 Software Engineering. Lecture 11. Design Patterns CPSC 310 Software Engineering Lecture 11 Design Patterns Learning Goals Understand what are design patterns, their benefits and their drawbacks For at least the following design patterns: Singleton, Observer,

More information

Abstract Classes. Abstract Classes a and Interfaces. Class Shape Hierarchy. Problem AND Requirements. Abstract Classes.

Abstract Classes. Abstract Classes a and Interfaces. Class Shape Hierarchy. Problem AND Requirements. Abstract Classes. a and Interfaces Class Shape Hierarchy Consider the following class hierarchy Shape Circle Square Problem AND Requirements Suppose that in order to exploit polymorphism, we specify that 2-D objects must

More information

Object interconnections גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Object interconnections גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון Object interconnections גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון 2 Roadmap In this chapter we move up a level of abstraction, and consider collections of objects working together Our focus will

More information

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! 14-2! Modular Software 2! Software constructed as assemblies

More information

Setting up the reading pane

Setting up the reading pane Setting up the reading pane A reading pane makes reading and managing emails easier by having everything in one view To set up the reading pane: 1 Click on the settings icon at the top right of the screen

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

Software Development. Modular Design and Algorithm Analysis

Software Development. Modular Design and Algorithm Analysis Software Development Modular Design and Algorithm Analysis Data Encapsulation Encapsulation is the packing of data and functions into a single component. The features of encapsulation are supported using

More information