CPSC 872 John D. McGregor Session 21 Architecture Design, cont’d.

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

Design Patterns.
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Software Engineering Implementation Lecture 3 ASPI8-4 Anders P. Ravn, Feb 2004.
The Singleton Pattern II Recursive Linked Structures.
Java Review Interface, Casting, Generics, Iterator.
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
Chapter 1: Computer Systems
Programming with Java. Problem Solving The purpose of writing a program is to solve a problem The general steps in problem solving are: –Understand the.
Exception Handling – illustrated by Java mMIC-SFT November 2003 Anders P. Ravn Aalborg University.
Written by: Dr. JJ Shepherd
The Java Programming Language
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
Recommendation: Play the game and attempt to answer the questions yourself without looking at the answers. You’ll learn much less if you just look at the.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Chapter 1 Introduction.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
CS 4240: Introduction to Design Patterns Readings: Chap. 5 of Design Patterns Explained Also, Chap. 6 and 7 Also, on-line info on Composite pattern (and.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
Java: Chapter 1 Computer Systems Computer Programming II.
Java Language and SW Dev’t
General Features of Java Programming Language Variables and Data Types Operators Expressions Control Flow Statements.
The Java Programming Language
JAVA Tokens. Introduction A token is an individual element in a program. More than one token can appear in a single line separated by white spaces.
Exceptions. Exception Abnormal event occurring during program execution Examples –Manipulate nonexistent files FileReader in = new FileReader("mumbers.txt“);
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Patterns and Reuse. Patterns Reuse of Analysis and Design.
Chapter 2: Java Fundamentals
CPSC 372 John D. McGregor Module 4 Session 1 Design Patterns.
Networks Sockets and Streams. TCP/IP in action server ports …65535 lower port numbers ( ) are reserved port echo7 time13 ftp20 telnet23.
Java The Java programming language was created by Sun Microsystems, Inc. It was introduced in 1995 and it's popularity has grown quickly since A programming.
CPSC 371 John D. McGregor Session 32 This is it..
Factory Method Explained. Intent  Define an interface for creating an object, but let subclasses decide which class to instantiate.  Factory Method.
CPSC 871 John D. McGregor Module 5 Session 1 Design Patterns.
Iteration Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Iteration. Java looping Options –while –do-while –for Allow programs to control how many times a statement list is executed.
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha.
U n i v e r s i t y o f H a i l 1 ICS 202  2011 spring  Data Structures and Algorithms 
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
The Facade Pattern (Structural) ©SoftMoore ConsultingSlide 1.
CS 116 OBJECT ORIENTED PROGRAMMING II LECTURE 12 GEORGE KOUTSOGIANNAKIS Copyright: 2015 Illinois Institute of Technology/ George Koutsogiannakis 1.
Written by: Dr. JJ Shepherd
CPSC 875 John D. McGregor Quality Attribute Design.
PROTOTYPE. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract factory.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science.
CPSC 872 John D. McGregor Session 18 Evaluating Specification.
1 Iterator Pattern (A Behavioral Pattern) Prepared by: Neha Tomar.
CPSC 872 John D. McGregor Session 31 This is it..
Introduction to Java Programming by Laurie Murphy Revised 09/08/2016.
1 Problem Solving  The purpose of writing a program is to solve a problem  The general steps in problem solving are: Understand the problem Dissect the.
OBJECT ORIENTED PROGRAMMING II LECTURE 21 GEORGE KOUTSOGIANNAKIS
Trace Tables In today’s lesson we will look at:
Design Patterns: Brief Examples
Working with Java.
What’s cheating and what is not?
Software Design and Architecture
I/O Basics.
Iteration.
John D. McGregor Session 9 Testing Vocabulary
null, true, and false are also reserved.
Introduction to Java Programming
Chapter 1: Computer Systems
Test patterns.
JavaScript Reserved Words
Lecture Notes – Week 4 Chapter 5 (Loops).
OBJECT ORIENTED PROGRAMMING II LECTURE 22 GEORGE KOUTSOGIANNAKIS
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
COMPUTING.
Presentation transcript:

CPSC 872 John D. McGregor Session 21 Architecture Design, cont’d

Specification and design problem solution specification implementation specification

Styles us/library/ee aspx us/library/ee aspx Pipeline style – us/library/ff aspx us/library/ff aspx Layered style

Styles – 2: Control Loop

Closed loop control style Monitors fluctuating variable Takes action when violates boundary Sensitivity of thermostat

Design Patterns Singleton – ngleton_pattern.htm ngleton_pattern.htm Observer – bserver_pattern.htm bserver_pattern.htm

Pattern Pattern Name (Scope, Purpose) Intent Also Known As Motivation Applicability Structure Participants Collaborations Consequences Implementation An implementation Sample Code and Usage Program Listing Known Uses Examples of the pattern found in real systems. Related Patterns

Language Idioms class Person { String name; int birthYear; byte[] raw; public boolean equals(Object obj) { if (!obj instanceof Person) return false; Person other = (Person)obj; return name.equals(other.name) && birthYear == other.birthYear && Arrays.equals(raw, other.raw); }

Stream manipulation public interface InputStreamAction { void useStream(InputStream stream) throws IOException; } // Somewhere else public void executeWithFile(String filename, InputStreamAction action) throws IOException { InputStream stream = new FileInputStream(filename); try { action.useStream(stream); } finally { stream.close(); } }

Putting it all together Identify quality attributes that are important Prioritize them Select patterns that will enhance the most important quality attribute Refactor Repeat with next most important QA

Running example The system architecture looks like: Car OBD Phone Cloud