Object-Oriented Programming

Similar documents
Introduction to Object-oriented Programming in Smalltalk

Fundamental Concepts (Principles) of Object Oriented Programming These slides are based on:

ECE Object-Oriented Programming using C++ and Java

CS 536. Class Meets. Introduction to Programming Languages and Compilers. Instructor. Key Dates. Teaching Assistant. Charles N. Fischer.

CITS2210. Object-Oriented Programming. Topic 1. Introduction and Fundamentals: Thinking Object-Oriented

Grande Prairie Regional College

CAP - Advanced Programming Concepts

Appendix A - Glossary(of OO software term s)

2. Classes & Inheritance. Classes. Classes. Éric Tanter Objects and Design in Smalltalk. How do you create objects?

CMPT Data and Program Organization

Linked lists. Prof. Noah Snavely CS1114

C++ (Non for C Programmer) (BT307) 40 Hours

Physics 2660: Fundamentals of Scientific Computing. Lecture 3 Instructor: Prof. Chris Neu

Creating Reports using Report Designer Part 1. Training Guide

CS 2530 INTERMEDIATE COMPUTING

QUIZ #5 - Solutions (5pts each)

ECOM 2314 COMPUTER PROGRAMMING II

Grande Prairie Regional College

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

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Implementation of Programming Languages. Guido Salvaneschi Jurgen Van Ham

Testing Object-Oriented Applications. Slide Set to accompany. Software Engineering: A Practitioner s Approach, 7/e by Roger S.

Object-Oriented and Classical Software Engineering

Why using Smalltalk for Teaching Object- Oriented Design

Object-Oriented and Classical Software Engineering

Programming Languages and Techniques (CIS120)

Sun City Grand Computers Devices SIG. Grand Computers 1 GraComputers

Digital Circuits ECS 371

Create a Labeling Worksheet

Computer Science 32 Object-Oriented Oriented Design and Implementation (in C++ on Linux)

Scheduling WebEx Meetings with Microsoft Outlook

ITT Technical Institute. SD1420 Introduction to Java Programming Onsite and Online Course SYLLABUS

Course Status Polymorphism Containers Exceptions Midterm Review. CS Java. Introduction to Java. Andy Mroczkowski

Course Syllabus - CNT 4703 Design and Implementation of Computer Communication Networks Fall 2011

Programming 2. Outline (112) Lecture 0. Important Information. Lecture Protocol. Subject Overview. General Overview.

CPSC 2380 Data Structures and Algorithms

Object-Oriented Concepts and Design Principles

EDTE 330A/B. Educational Technology in the Classroom: Applications and Integrations

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

DOWNLOAD PDF VISUAL STUDIO 2008 LEARNING GUIDE

Advanced Compiler Design. CSE 231 Instructor: Sorin Lerner

Testing. Unit, integration, regression, validation, system. OO Testing techniques Application of traditional techniques to OO software

Station Community Engagement Survey Results

Comp 311 Principles of Programming Languages Lecture 21 Semantics of OO Languages. Corky Cartwright Mathias Ricken October 20, 2010

CSE 153 Design of Operating Systems

Introduction to Test Driven Development (To be used throughout the course)

San José State University Department of Computer Science CS151, Object Oriented Design, Section 04, Fall, 2016 (42968)

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

The 10 Minute Guide to Object Oriented Programming

CS503 Advanced Programming I CS305 Computer Algorithms I

COMP-202: Foundations of Programming. Lecture 8: for Loops, Nested Loops and Arrays Jackie Cheung, Winter 2016

Scheduling WebEx Meetings with Microsoft Outlook

Programming Languages 2nd edition Tucker and Noonan"

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

History of object-oriented approaches

Implementation of Programming Languages (project) Guido Salvaneschi Joscha Drechsler

CAP - Advanced Programming Concepts

Introduction to Access 97/2000

Information Systems Analysis and Design. XIV. Design Patterns. Design Patterns 1

Scheduling WebEx Meetings with Microsoft Outlook

*ANSWERS * **********************************

Need help? Call: / DOCMAIL: PRINT DRIVER USER GUIDE

Introduction. Object Orientated Analysis and Design. Benjamin Kenwright

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu

Organizing your Outlook Inbox

Goals of the Lecture OO Programming Principles

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

B. V. Patel Institute of Business Management, Computer & Information Technology

Lecture 2: Software Engineering (a review)

Object- Oriented Design with UML and Java Part I: Fundamentals

Lecture 15 Software Testing

Java Camp Daily Schedule

17. GRASP: Designing Objects with Responsibilities

CS 134 Programming Exercise 3:

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

Scheduling WebEx Meetings with Microsoft Outlook

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU

View a Students Schedule Through Student Services Trigger:

Tuesday and Thursday 1:05 pm - 2:25 pm

Traits: Tools and Methodology

a. Choose your address: This will become the web address for your wiki page. iii. Workspace purpose: Choose whatever you want.

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis

Advanced Compiler Design. CSE 231 Instructor: Sorin Lerner

An Overview of Visual Basic.NET: A History and a Demonstration

Course Scheduling System User s Guide

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

Introduction to Spreadsheets

Personalized. Precall. Mail

Plymouth Canton Educational Park Plymouth High School 8400 Beck Road Canton, Michigan Course Syllabus

Object Oriented Processes. R.K.Joshi Dept of Computer Science and Engg. IIT Bombay

9/11/2014. Agenda. What is Counterintelligence?

Learning OOABL - The Human Factor

Report Prepared By: Prof. Aruna Pavate

Course Syllabus: CompTIA A+ Hardware

Advanced Operating Systems (CS 202)

Welcome to Solving Problems with Computers I

Technical Bootcamp. Technical Bootcamp. Microsoft Dynamics AX 2012 FOR MICROSOFT DYNAMICS AX 2012 R3

Introduction to Nate Foster Spring 2018

Transcription:

Object-Oriented Programming CS420/520 Winter 2012 Prof Andrew P. Black 1

Administrivia Instructor: Andrew Black, 503 725 2411 (office) 503 803 1669 (cell). email: black@cs.pdx.edu, put [CS520] in subject header Office (FAB 115-10): Monday 11:30 noon and Wednesday 11:15 11:50, or by appointment. Feel free to telephone for an appointment. Class meets: Tuesday and Thursday 14:00 15:50 in FAB 040-08 2

Web Resources http://web.cecs.pdx.edu/~black/oop/ 3

Educational Goals To change the way that you think Learn a new set of concepts and the vocabulary to talk about them: object, class, message, protocol, instance variable, method, refactoring delegation, genericity, traits, incremental programming, type-checking, polymorphism, encapsulation, and set-based abstraction 4

To teach new skills Learn to program in an object-oriented languages with a non-conventional structure: Smalltalk A preview of a new language: Grace Learn a new methodology: test-driven development, which combines design & programming. Learn to use these techniques well enough to build not just working systems, but elegant systems. 5

Impart knowledge, and (perhaps) develop understanding! Explore the design space of O-O languages, using Smalltalk and Grace fixed points Discuss some of the ongoing issues of Object- Oriented Programming: Patterns and objects? Whither inheritance? Up-front design vs. Continuous design (XP) 6

Non-Goals To become an expert in Squeak (or Grace) class libraries for windowing, gui construction, or whatever you will use them as tools and examples To become expert in OO modeling and analysis 7

Object-Oriented Thinking Agents & messages Me send flowers Structure problems and solutions as a community of interacting agents Sally 8

Object-Oriented Thinking Agents & messages Me Flora Sally s Florist Each agent is autonomous Arranger Delivery Person Refrigerator Sally 9

Responsibility, Messages and Methods An agent (or object) is responsible for achieving the desired objective. It delegates responsibility to other agents by sending them messages (requesting methods) The message asks the agent to do something for me, but does not specify how That s what being responsible for something means 10

Receiving agent has its own method to do whatever is requested Flora-- takes orders Sally -- receives orders Arranger -- arranges 11

Object-oriented Thinking Classification of Objects Many objects are similar to other objects e.g. flora is similar to other florists Hence, we often define the behavior of a whole class of agents (Florists) rather than defining an individual (flora) Not so convenient if there is only one object 12

Objects often considered as members of a set of similar individuals called a class. Human Shopkeeper Florist flora Classes inherit characteristics from their parents - some classes behave differently from their parent. 13

Some objects are unique! mouse, screen, uidgenerator Consequently: some languages are class-based, some are objectbased. 14

Objects are responsible for their own actions! In procedural programming, I write code that reaches into the internals of some data structure and twiddles with the bits 0 0 1 1 0 0 1 1 string process reads/ writes process reads/ writes process reads/ writes 15

In O-O programming, I politely request some other object to perform some work on my behalf, and it politely answers me String 0 0 1 1 0 0 1 1 copy print concat 16

Computation as Simulation This collection of autonomous objects is like the world of discreet event simulation Anthropomorphize! It s OK to think about this object talking to that object... In fact, it s recommended 17

Programming Philosophy Object-Oriented programming is programming by simulation. The algorithm is less important than the structure of the solution. When requirements change: If the structure represented the structure of some reality, then the new requirements will be consistent in that reality. Object-oriented design is the search for this structure: uncover the structure rather than construct in isolation. 18

Shopping vs. Building Constructing an Object-oriented application is a process of shopping for the components that one needs occasionally we add a new item to the shelf. usually we can find a component that almost fits. The openness of an OO language allows the programmer to change the component that almost fits into one that is a good fit. works only if we have a rich set of components on the shelf, and if they are open to change. 19

Is this the only view of OO Programming? No! People disagree on the meaning and role of: 1. Encapsulation 2. Types 3. Inheritance 4. Polymorphism 5. Sets and classes 20

Scope of CS 520/420 First 2/3 of the Quarter Smalltalk, programming patterns, test-driven development, continuous design Final 1/3 of the Quarter Topics on languages, design patterns, library design, implementation Ratio may vary Feel free to propose a topic 21

Pharo Pharo is an open-source version of Smalltalk Derived from Squeak, in turn derived from Smalltalk-80 Pharo workspace is a place in which you can create and interact with objects Active community of contributors Runs "bit identical" on just about any platform, including many smart-phones 22