OOP in Introductory CS Stephen Wong and “Zung” Nguyen Rice University Better students though abstraction.

Slides:



Advertisements
Similar presentations
SIGCSE 2005, St. Louis, MO Design Patterns for Recursive Descent Parsing Dung Nguyen, Mathias Ricken & Stephen Wong Rice University.
Advertisements

Marine Biology Simulation Part I: Introduction Dung “Zung” Nguyen Mathias Ricken Stephen Wong TeachJava 2004! June 25, 2004.
Design Patterns for Self-Balancing Trees Dung “Zung” Nguyen Stephen Wong Rice University.
Unified Modeling Language
Design Patterns for Marine Biology Simulation Dung “Zung” Nguyen Mathias Ricken Stephen Wong Rice University.
DESIGN PATTERNS OZGUR RAHMI DONMEZ.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
 3D graphics environment  Focuses on Object Oriented Programming  Provides immediate feedback through program visualizations  Contains a drag-and-drop.
FYI: Objects and Patterns 1 OO Overkill When Simple is Better than Not Owen Astrachan NSF Career
Nifty Assignments for BlueJ Day March 1, 2006 Rathika Rajaravivarma Central Connecticut StateUniversity.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
4 Dec 2001Kestrel1 From Patterns to Programming Languages Matthias Felleisen Northeastern University.
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
Introduction To System Analysis and Design
By Xiangzhe Li Thanh Nguyen.  Introduction  Terminology  Architecture  Component  Connector  Configuration  Architectural Style  Architectural.
CSC 211 Introduction to Design Patterns. Intro to the course Syllabus About the textbook – Read the introduction and Chapter 1 Good attendance is the.
 How are you going to collaborate?  How are you going to divide up work?  How are you going to make sure that changes work with other people’s code?
Object-Oriented Analysis and Design NGSSC Object-Oriented Scientific Programming, June 2012.
.NET in a Software Engineering Course: Frameworks and Fun Stephen Wong Dung “Zung” Nguyen Ryan Aipperspach Bryan Lipinski James McDougall Ali Ongun Rice.
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
DAAD project “Joint Course on OOP using Java” On Object Oriented modeling in Java (Why & How) Ana Madevska Bogdanova Institute of informatics Faculty of.
Design Patterns for Sorting Teaching something old in a new light Dung “Zung” Nguyen Stephen Wong Rice University.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
Marine Biology Simulation Part II: Assignment, Milestone 1 Dung “Zung” Nguyen Mathias Ricken Stephen Wong TeachJava 2004! June 25, 2004.
Design Patterns for Marine Biology Simulation Dung “Zung” Nguyen Mathias Ricken Stephen Wong Rice University.
Abstraction CMPS Abstraction Abstraction mechanisms are techniques to deal with creating, understanding and managing complex systems Abstraction.
Nifty Assignments: Marine Biology Simulation OOPSLA ‘04 Educators’ Symposium October 25, 2004 Eric Cheng Mathias Ricken Dung “Zung” Nguyen Stephen Wong.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
CS 4233 Review Feb February Review2 Outline  Previous Business – My.wpi.edu contains all grades to date for course – Review and contact.
Midterm Study Guide COP 4331 and EEL4884 OO Processes for Software Development © Dr. David A. Workman School of EE and Computer Science University of Central.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Advanced Object-Oriented Design Patterns and Architectures Part One COEN396A John Xiao
Patterns in cs education Matthias Felleisen & Daniel Jackson NDIST · December 5, 2001.
Boris Milašinović Faculty of Electrical Engineering and Computing University of Zagreb, Croatia 15th Workshop on "Software Engineering Education and Reverse.
Inspired by the Oulipu. The 3 Tenets of OO Encapsulation Polymorphism Inheritance.
Patterns for Decoupling Data Structures and Algorithms or How visitors can help you grow! Stephen Wong, Oberlin College Dung “Zung” Nguyen, Pepperdine.
Patterns for Decoupling Data Structures and Algorithms Dung “Zung” Nguyen Pepperdine University / University of Houston Stephen Wong Oberlin College
Design Patterns for Games Proceedings of the 33 rd SIGCSE technical symposium on Computer Science Education Melisa Tyira SE510.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
04 - OOD Intro.CSC4071 Software Design ‘Requirements’ defines –The goals the system needs to satisfy. ‘Specification’ defines –The externally-observable.
CSE 332: Design Patterns (Part II) Last Time: Part I, Familiar Design Patterns We’ve looked at patterns related to course material –Singleton: share a.
Fundamentals of Visual Modeling with UML Module 1: Introduction to Object Technology.
Week 5, Day 3: Decorator Decorators Muddiest Point Tomorrow: Quiz on lab reading: web.msoe.edu/hasker/se2811/labs/5/ SE-2811 Slide design:
Week 5, Day 2: Decorator Decorators Muddiest Point Tomorrow: Quiz on lab reading: web.msoe.edu/hasker/se2811/labs/5/ SE-2811 Slide design:
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Industrial Group Project Introduction to Object Oriented Programming Adelina Basholli, February, 2016.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
서울대한양대 ( 안 산 ) 충남대 1년1년 컴퓨터기초 (C) 컴퓨터프로그래밍 (C, Java) 컴퓨터프로그래밍 (C) 2. 봄 프로그래밍 원리 (Scheme, ML) Structure & Interpretation of Computer Programs 프로그래밍 방법론.
Mercer Institute for Personal Robots in Education (IPRE)‏ CSC 170 Computing: Science and Creativity.
Design Patterns: MORE Examples
Design Patterns for Sorting Teaching something old in a new light
Marine Biology Simulation Part I: Introduction
Introduction to Design Patterns
Design Patterns.
OO Methodology OO Architecture.
Design Patterns for Sorting something old in a new light
Chapter 10 Thinking in Objects
Design Patterns for Sorting Teaching something old in a new light
EECE 310 Software Engineering
Comp 401 Concluding Remarks
Nifty Assignments: Marine Biology Simulation
Design Patterns for Lazy Evaluation
Introduction to Computer Science for Majors II
Design Patterns for Recursive Descent Parsing
Review CSE116 2/21/2019 B.Ramamurthy.
Presentation transcript:

OOP in Introductory CS Stephen Wong and “Zung” Nguyen Rice University Better students though abstraction

A Struggling Pedagogy OO Overkill Duke Univ. Java Power Tools Northeastern Univ. OO Lab Project Univ. Wisconsin Etc., etc. Polymorphic Panelists Graphics-based OO Wiliams College Karel the Robot Univ. Waterloo and others OOPSLA OO Workshop

Old Intro CS at Oberlin CS 1 & 2 in Java Was procedural + a bit of OOP 3 rd semester in Scheme Problems Students knew syntax but not programming. A big conceptual jump into Scheme No experience with design. No large scale project experience. Non-inspiring course.

What can students do? Koch Curves Frogger, pretty Swarming/Flocking Simulation Movie loop, cute Multiple controllable threads Puzzle Game Frogger, extended Movie loop, techno Ballworld Animation Frogger, nuts Remote, distributed agents Client-server game

OO First? Myth: OO is an advanced concept. Students intrinsically understand polymorphism Students intrinsically understand object behaviors. Students intrinsically understand how objects interact Leverage what the students already understand! Definitely!

It’s not that easy… Concrete objects Abstract objects Concrete behaviors Abstract behaviors Learning abstract thinking is not easy. Abstraction the key to understanding CS

What is a Design Pattern? An abstracted solution to a class of problems. Describes relationships between objects Describes when and how those relationships can used. But why do they work? Design patterns are expressions of fundamental CS principles

The Road Concrete Objects Abstract Objects & Behaviors Polymorphism Strategies Encapsulation Recursion Visitors State Pattern Abstract Construction Factories Decoupling Adapters Decorators Lambda Calculus Anonymous classes Composition Delegation

AElement +accept(AVisitor v) +other methods… ElementA +accept(AVisitor v) ElementB +accept(AVisitor v) Example: Visitor Pattern Concrete Elements Abstractly Equivalent v.methodA(this);v.methodB(this); One method per element AVisitor +methodA(AElement e) +methodB(AElement e) Visitor1 +methodA(AElement e) +methodB(AElement e) Visitor2 +methodA(AElement e) +methodB(AElement e) Concrete Visitors Abstractly Equivalent Abstract, Invariant Data Structure Variant, Decoupled Algorithms

Visitors Teach… Decoupling of variant and invariant Polymorphic dispatching Encapsulation of a process Abstract equivalence If elements are empty vs. non-empty lists Visitor methods: base and inductive cases. Declarative style programming Design Patterns are tools to teach CS concepts

Design Patterns as Embodiments of Abstract Concepts Abstract behavior Decoupled behavior Recursion Abstract construction Strategy State Visitor Decorator Variant vs. Invariant Encapsulation Delegation Factory Composite MVC Adapter

The Role of Design Patterns Design Patterns Language of Abstraction Tangible Abstraction Focus on Abstraction

Example: Koch Curve Lab Koch -Point a,b +grow(AFactory f) +paint() DrawOneState grow(AFactory f) paint() DrawManyState grow(AFactory f) paint() CurveFactory +makeOne() +makeMany() SnowflakeFactory +makeOne() +makeMany() AKochState grow(AFactory f) paint() 1 LRStruct execute(IAlgo algo) 1 * GrowAlgo nullCase() nonNullCase() PaintAlgo nullCase() nonNullCase() 1 1 AFactory +makeOne() +makeMany() uses A curve between 2 pointsState Design Pattern Concrete States Base caseInductive caseComposite Pattern LRStruct Visitor Pattern Algorithms Base case construction Factory Design Pattern Inductive case construction Base case Inductive case Concrete Factories Only one line of code that actually grows/paints! Run program

Technology an Integral Part of the Pedagogy UML Diagramming Tool Integrated Development Environment Focus on design, not syntax Focus on the objects/classes, not the implementation Focus on the problem, not API Focus on the Abstraction!!

Plugging into the Students What is it that really interests our students? Games AI Roboti cs Graphic s “Real Programs” Networking

Getting the Students to Plug In Graphical Interfaces Simplicity + Power Unimagined capabilities Cutting edge technology Fun, fun, fun!!!

Synergy Focus on AbstractionDesign Patterns Development Tools Leveraged Student Experiences Rich Lab Experiences Cohesive Pedagogical Path Fundamental CS Principles Fun, inspiring results Learning Abstract Thinking. The best students ever. Demos