Patterns – Day 13 Responsibility Read chapters 6-11 of Metsker. If you have not given me an electronic copy of your (past) presentation, please do so.

Slides:



Advertisements
Similar presentations
The Sales Presentation
Advertisements

How to Succeed in Mathematics WOU Mathematics Department
Of Mice and Men by John Steinbeck Chapter one. Lennie is a simple minded, soft hearted and childlike giant of a man who acts before he thinks and cannot.
HOW TO RESOLVE CONFLICTS WITHOUT OFFENDING ANYONE.
Healthy Church Workshop HOSPITALITY. Healthy Church Workshop: HOSPITALITY Agenda HCI Warm Up – Church Web of Support What Is Radical Hospitality? (Part.
Georgia Institute of Technology Workshop for CS-AP Teachers Chapter 3 Advanced Object-Oriented Concepts.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Patterns – Day 9 Façade Composite Reminders: Faculty candidate talk Friday 4:20 PM O-267. Brian Postow: Games and Complexity Theory Another talk on Monday!
Patterns – Day 8 Adapter continued Facade Reminders: Faculty candidate talk Friday 4:20 PM O-267. Brian Postow: Games and Complexity Theory No class tomorrow.
Exceptions. Errors and Exceptions An error is a bug in your program –dividing by zero –going outside the bounds of an array –trying to use a null reference.
Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
Patterns – Day 10 Composite Responsibility Reminder: Faculty candidate talk Today 4:20 PM O-267. Salman Azhar: Optimal Prediction via Data Compression.
Style Rules I. Style is important Everyone agrees that good style is important –Everyone agrees on most of the essentials –But some people have “religious.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
HRM-755 PERFORMANCE MANAGEMENT
Patterns – Day 11 Reminder: Faculty candidate talk Today 4:20 PM O-157. Salman Azhar: Optimal Prediction via Data Compression Read chapters 6-11 of Metsker.
PARENT NIGHT Summer Slide Prevention. WELCOME TO 3 RD GRADE! By the 3rd grade, children have spent two years mastering reading and doing basic math computations.
Section 38.3 The Job Interview
Career Investigation Explanation (do not copy into this presentation, it is not a template for your project!)
Friday January 11, 2013 Continue working on your literary essay rough draft. Remember you need to complete the rough draft on your plot diagram that.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented Design.
1 Design and Integration: Part 1 Nuggets about Design vs Project Management.
Preparing for Interviews
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
An Object-Oriented Approach to Programming Logic and Design
Software Development © 2014 wheresjenny.com Software Development.
Questions to answer 1. What is a thesis? 2. What does supporting or substantiating your thesis mean? 3. When are thesis statements especially important?
EFFECTIVE CLASSROOM MANAGEMENT By: Adrienne Hodge Arkansas State University Site 2012.
Downloaded from Lecture 8: Crew Personality & Attitude.
Thoughts from Prison Colossians 4:2-10a We have a tendency to…  Keep secrets we think will embarrass  Believe “If I don’t say it, it isn’t true”  Hide.
Errors And How to Handle Them. GIGO There is a saying in computer science: “Garbage in, garbage out.” Is this true, or is it just an excuse for bad programming?
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
Chapter 2 Introducing Interfaces Summary prepared by Kirk Scott.
READING PERSUASIVE TEXTS What is persuasion? What is persuasion? Persuasion is the act of influencing someone to believe or consider a certain point.
Eric Roberts Professor of Computer Science Stanford University Google Atlanta October 1, 2010 Converting Java into JavaScript.
M1G Introduction to Database Development 2. Creating a Database.
M1G Introduction to Database Development 4. Improving the database design.
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
Writing Personal Essays. Narration  Narration means the telling of an event in time or a sequence of events that exist in time. (Usually in chronological.
Observer Please Snarf the Code for Today’s Class..
How paragraphs are formed How to develop stronger paragraphs How to completely and clearly express your ideas What you can expect to learn from this presentation:
Supply Chain Management Customer Service Operations LB IV Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution.
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
Chapter 5 Files and Exceptions I. "The Practice of Computing Using Python", Punch & Enbody, Copyright © 2013 Pearson Education, Inc. What is a file? A.
What Great Teachers Do Differently 14 Things That Matter Most.
Welcome! EWRT1A Composition and Reading. Agenda Extra Credit Available Workshop Rough Draft Introductions and Thesis Statements Homework.
By Godwin Alemoh. What is usability testing Usability testing: is the process of carrying out experiments to find out specific information about a design.
EndNote X1 An introduction to the PPC library and the software we use to keep track of it.
Review In the past three months we have discussed Hitlamdut, Behira Points and Anavah. I asked that you try to practice these by yourselves, discuss it.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Staffordshire UNIVERSITY School of Computing Version Jan 08 original by K.Ingram & J.Westlake1 Special Relationships between Use Cases Normally it is not.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Idiom of the Day IN THE LOOP To keep someone informed and up-to-date about what’s happening – usually in the workplace.
CHAPTER 9 ANNISA FAIZAH( ) RAHAJENG H. RARAS( ) ANA CLARISTI( ) DAMARINA( ) ASKING AND EXPLAINING.
PRESENTER: MS. CRYSTAL WATSON DATE: OCTOBER 4, 2014 Preparing for a Successful Job Interview.
¡Bienvenidos! → Vámonos Assigned seats will start later this week. Just make sure you have something to write with and something to write on. Verbally.
Having fun ignoring signals. Where do you use feedback in your life?
But what about sometimes when we ask God for help and nothing seems to change? Write down a time when you have asked God to help and he hasn’t? Well, the.
DSMA 0393/1414 Comments of Students. Co-requisite Model Student Comments Students were given this request on their final examination: Write a statement.
C++ Programming Basics C++ Lecture 1 Stacy MacAllister.
Object-Oriented Design
Chapter 11 Object-Oriented Design
Group 5 Presentation: p By: Chris P and Sam R.
LO Adding and subtracting with negative numbers RAG
The Object-Oriented Thought Process Chapter 05
CSCE 489- Problem Solving Programming Strategies Spring 2018
Static Class Members March 29, 2006 ComS 207: Programming I (in Java)
Workshop for Programming And Systems Management Teachers
Software Design Lecture : 28.
Object Oriented System Design Responsibilities
Presentation transcript:

Patterns – Day 13 Responsibility Read chapters 6-11 of Metsker. If you have not given me an electronic copy of your (past) presentation, please do so. No class tomorrow or Monday

Reminders Some purposes of patterns –Re-use –Maintenance

Presentations happening soon We’re doing some chapters out of order, so that I don’t do too many in a row. Not ideal, but the best I can do. Be ready on your “earliest day”. It is possible that it will happen later. It is possible that it will be split.

Questions, comments, rebuttals, etc.?

Responsibility In one sense, responsibility is what OO design and programming are all about. Who is responsible for what? So most patterns will say something about responsibility. In Metsker’s classification, seven of the patterns particularly deal with this.

Normal responsibility In Metsker's view, Normal responsibility = _________ responsibility

CHALLENGE 7.1 CHALLENGE 7.1 The class structure shown here has at least ten questionable assignments of responsibility. For five of these, write a statement of what is wrong.

What do you think of these statements? Establishing principles for the proper assignment of responsibility in object- oriented systems seems to be an area ripe for progress in computer science. –A system in which every class and method clearly defines its responsibilities and bears them correctly is a strong system, probably stronger than most systems we encounter today.

What do you think of these statements? It is common to speak of classes and methods as bearing various responsibilities. –In practice, this usually translates into your bearing responsibility for the solid design and proper functioning of your code. Fortunately, –Java offers some relief. You can limit the visibility of your classes, fields, and methods and thereby limit your responsibility to developers who use your code.

Controlling Responsibility by Limiting Visibility. Metsker's example: –Objects are usually responsible for maintaining themselves in a consistent state. –If we allow other people's code to change a field, the consistency might be broken. –Picture on next slide

Oozinoz visibility example If someone creates a subclass that "burrows" into a SolidRocket, the consistency can be lost. CHALLENGE 7.4CHALLENGE 7.4 In this situation, how could you prevent other developers from taking advantage of protected fields by subclassing into classes in your package?

Responsibility Patterns If you intend toApply the pattern Centralize responsibility in a single instance of a class SingletonSingleton (Chapter 8)Chapter 8 Decouple an object from awareness of which other objects depend on it ObserverObserver (Chapter 9)Chapter 9 Centralize responsibility in a class that oversees how a set of other objects interact MediatorMediator (Chapter 10)Chapter 10 Let an object act on behalf of another object ProxyProxy (Chapter 11)Chapter 11 Allow a request to escalate up a chain of objects until one handles it Chain of Responsibility Chain of Responsibility (Chapter 12)Chapter 12 Centralize responsibility in shared, fine- grained objects FlyweightFlyweight (Chapter 13)Chapter 13