CMPUT 301: Lecture 02 Basic concepts of Design and Implementations Lecturer: Martin Jagersand Department of Computing Science University of Alberta Notes.

Slides:



Advertisements
Similar presentations
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Advertisements

Programming Languages and Paradigms
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
Abstraction Lecture-4. ADT example: London Underground Map.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
CMPUT 301: Lecture 25 Graphic Design Lecturer: Martin Jagersand Department of Computing Science University of Alberta Notes based on previous courses by.
Robotic Hand-Eye Systems CMPUT 610 Martin Jagersand.
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
Object Oriented Design. Goals  Levels of abstraction  Workshop: group meeting for Pragmatic Web homework.
1 CMSC 132: Object-Oriented Programming II Software Development IV Department of Computer Science University of Maryland, College Park.
Programming Languages Structure
CMPUT 301: Lecture 01 Introduction Lecturer: Martin Jagersand Department of Computing Science University of Alberta Notes based on previous courses by.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Introduction to Object-oriented Programming Introduction to Object-oriented Programming CMPS 2143.
UML and Object Oriented Concepts
Introduction SWE 619. Why Is Building Good Software Hard? Large software systems enormously complex  Millions of “moving parts” People expect software.
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
PROGRAMMING LANGUAGES The Study of Programming Languages.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 6 Program Design 4/18/09 Python Mini-Course: Day 2 - Lesson 6 1.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Software Life-Cycle Models Somnuk Keretho, Assistant Professor Department of Computer Engineering Faculty of Engineering, Kasetsart University
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
1 Programming Language History and Evolution In Text: Chapter 2.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Designing Classes Prelude © 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank.
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
CPSC 871 John D. McGregor Module 3 Session 1 Architecture.
Copyright © Genetic Computer School 2008 Computer Systems Architecture SA 7- 0 Lesson 7 Memory Management.
Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Programming Languages
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Language Paradigms CS655.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Programming Language History and Evolution
CompSci 280 S Introduction to Software Development
Programming paradigms
Concepts of Programming Languages
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Programming Language Design Concepts
SOFTWARE DESIGN AND ARCHITECTURE
Programming Language History and Evolution
Developing Applications
Ada – 1983 History’s largest design effort
Programming Languages 2nd edition Tucker and Noonan
Principles of Programming Languages
Overview of Programming Paradigms
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages and Paradigms
School of Computer & Information Engineering,
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

CMPUT 301: Lecture 02 Basic concepts of Design and Implementations Lecturer: Martin Jagersand Department of Computing Science University of Alberta Notes based on previous courses by Ken Wong, Eleni Stroulia Zach Dodds, Martin Jagersand

2 Goals today: Concepts and stages in the program designs and implementation process. How and why Object Oriented design and Programming evolved and where it fits in the greater picture of SwEng paradigms. Some practical OO concepts and examples.

3 Design strategies overview: Previous courses: learned pragmatics of programming and principles of algorithms This course: Focus on whole project design. Important concepts: –abstraction (simplifying to its essentials the description of a real-world entity) –separation (treating “what” and “how” aspects independently)

4 Abstraction Examples:sales person, medical patient, etc.

5 Abstraction Design strategy 1: –focus on the essential aspects of an entity or concept –ignore or conceal non-essentials –map real-world entities to software objects Abstraction = –a named collection of attributes (data) and behavior (actions, methods) relevant to modeling a given entity for some particular purpose

6 Separation Design strategy 2: –separate “what” is to be done from “how” it is done –separate design issues from implementation details –separate externally “visible” behavior (interfaces) from hidden, internal mechanisms (implementations)

7 Interchangeable Implementations

8

9 Separation Separation of concerns: –interfaces reveal assumptions –implementations hide changeable details –interface == contract –avoid ripple effects

10 Design concepts vs. programming languages Note that design concepts (e.g. abstraction, separation …) are independent of programming languages But one or several programming language may support or impose certain concepts. Example: Separation: –.h files in c –Definition modules in modula 2,3 –Interfaces in java

11 Programming languages Programming paradigms and languages are between (and link) human concepts and ideas to machine implementations Have changed during time (more so than either ideas or machines) Computer Human ideas Prog. Lang.

12 Evolution of programming languages Machine lang Imperative (Fortran, c, Pascal…) Functional (lisp, ML, Haskell…) Logical (prolog, alf…) Object Oriented (Smalltalk, c++, java)

13 Design Strategies vs. programming languages Note again that design strategy (e.g. abstraction, separation …) are independent of programming languages. Also: The same project can be implemented using different strategies (and languages)

14 Example: Higher order functions Concept from functional design paradigms and mathematics Q=f g Implementation in imperative and OO languages and comments. (blackboard)

15 Example: XVision Provides visual tracking (rmember interaction video in last lecture) 10+ years effort several people, several univ Several implementations, same functionality Xvision (Upenn, Yale): c, c++, Imperative fVision (Yale): Haskell, greencard, c XVision2 (JHU): c++ (Written using some fvision design strat)

16 Xvision application: face tracking

17 Xvision (Upenn, Yale): c, c++, Imperative Written by “hackers” Neat tricks speed up, but shortcut across abstractions Good to provide specified functionality, but hard to port Hard to extend

18 fVision (Yale): Haskell, greencard, c trackMouth v = bestSSD mouthIms (newsrcI v (sizeof mouthIms)) trackLEye v = bestSSD leyeIms (newsrcI v (sizeof leyeIms)) trackREye v = bestSSD reyeIms (newsrcI v (sizeof reyeIms)) trackEyes v = composite2 (split, join) (trackLEye v) (trackREye v) where split = segToOrientedPts --- some geometry join = orientedPtsToSeg --- some more geometry trackClown v = composite2 concat2 (trackEyes v) (trackMouth v) Example program:

19 fVision (Yale): Haskell, greencard, c Uses dataflow model, higher order functions Much easier to script new behaviours Easier to express geometry More compact code Haskell code about speed: about ¼ of c

20 XVision2 (JHU): c++ See it in our lab, use in c306, learn in c610! Designed first, then implemented Extensible, portable Some loss of “neat” speadups due to separation and hiding Speed: ¼ - 1/7 of original c version.

21 Next time: Object oriented design strategies