Nifty Assignments: Marine Biology Simulation OOPSLA ‘04 Educators’ Symposium October 25, 2004 Eric Cheng Mathias Ricken Dung “Zung” Nguyen Stephen Wong.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Marine Biology Simulation Part I: Introduction Dung “Zung” Nguyen Mathias Ricken Stephen Wong TeachJava 2004! June 25, 2004.
Decorator Pattern Lecture Oo29 Artificial Life Simulation.
Design Patterns for Marine Biology Simulation Dung “Zung” Nguyen Mathias Ricken Stephen Wong Rice University.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
SOS OOP Fall 2001 Object Oriented Programming in Java Week 1 Read a design Design a small program Extract a design Run a VAJ program Change that program,
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Chapter 1 Principles of Programming and Software Engineering.
Dept. of Computer Engineering, Amir-Kabir University 1 Design Patterns Dr. Noorhosseini Lecture 2.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
UML and Object Oriented Concepts
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
DAAD project “Joint Course on OOP using Java” Design Patterns in the course ‘OOP in Java’ - first experiences Ana Madevska Bogdanova Institute of informatics.
Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
02/10/2015 Page 1 R. Theeuws Siemens Atea Filename: CBD_ervaring Werkgroep Component Based Developments Ervaring CBD.
Object-Oriented Programming and the Progress ABL Tomáš Kučera Principal Solution Engineer / EMEA Power Team.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
CS212: Object Oriented Analysis and Design GRASP Design Principles.
CSSE501 Object-Oriented Development. Chapter 11: Static and Dynamic Behavior  In this chapter we will examine the differences between static and dynamic.
OOP in Introductory CS Stephen Wong and “Zung” Nguyen Rice University Better students though abstraction.
Design Patterns for Sorting Teaching something old in a new light Dung “Zung” Nguyen Stephen Wong Rice University.
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
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.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
CS 160: Software Engineering October 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
1 Testing Object- Oriented Programs CS 4311 J. McGregor and D. Sykes. A Practical Guide to Testing Object-Oriented Software, Addison-Wesley, I. Burnstein.
Lecture 10 Concepts of Programming Languages Arne Kutzner Hanyang University / Seoul Korea.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-Oriented Programming Chapter Chapter
Inheritance Revisited Other Issues. Multiple Inheritance Also called combination--not permitted in Java, but is used in C++ Also called combination--not.
Design Patterns David Talby. This Lecture Re-routing method calls Chain of Responsibility Coding partial algorithms Template Method The Singleton Pattern.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
Design Patterns Introduction “Patterns are discovered, not invented” Richard Helm.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Patterns for Decoupling Data Structures and Algorithms or How visitors can help you grow! Stephen Wong, Oberlin College Dung “Zung” Nguyen, Pepperdine.
Session 7 Introduction to Inheritance. Accumulator Example a simple calculator app classes needed: –AdderApp - contains main –AddingFrame - GUI –CloseableFrame.
A High Flying Overview CS139 – Fall 2006 How far we have come.
Strategy in 15 minutes... derived from the principles.
Industrial Group Project Introduction to Object Oriented Programming Adelina Basholli, February, 2016.
A High Flying Overview CS139 – Fall 2010 How far we have come.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Design Patterns: MORE Examples
Sections Inheritance and Abstract Classes
Design Patterns for Sorting Teaching something old in a new light
Marine Biology Simulation Part I: Introduction
Testing Object-Oriented Programs
Behavioral Design Patterns
CMPE 135: Object-Oriented Analysis and Design October 24 Class Meeting
Design Patterns for Sorting something old in a new light
Design Patterns for Sorting Teaching something old in a new light
CS139 – Fall 2010 How far we have come
Objects and Aspects: What we’ve seen so far
Nifty Assignments: Marine Biology Simulation
Marine Biology Simulation Part III: Assignment, Milestone 2
Design Patterns for Recursive Descent Parsing
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
Marine Biology Simulation Part II: Assignment, Milestone 1
OOPSLA ’04 Educator’s Symposium
Presentation transcript:

Nifty Assignments: Marine Biology Simulation OOPSLA ‘04 Educators’ Symposium October 25, 2004 Eric Cheng Mathias Ricken Dung “Zung” Nguyen Stephen Wong

Marine Biology Simulation Based on AP Marine Biology Simulation Completely redone using OO design More robust, flexible, and extensible Two-week assignment in our objects-first CS2 courses Requires broad range of skills Assignment and Source Code Available

Marine Biology Simulation Demo

Structure of the Assignment Milestone 1 Part 1: KnightFish Add a new fish species to the simulation Part 2: WrappingEnv Add a new kind of environment Milestone 2 Part 3: Internals Re-implement parts of the simulation framework Part 4: Behavior Strategies Refactor framework to allow dynamic behavior changes Support code includes solution to Milestone 1

Structure of the Assignment SimpleFish UnboundedEnv Variant Fish Behavior Variant Environment Behavior White-box Framework: Extension by Subclassing

Part 1: KnightFish Randomly pick one of 8 targets

Part 1: KnightFish Turn into right direction For each step If blocked, done If open, go there and attempt the next step 3

3 Part 1: KnightFish Moves almost like a knight, except… No jumping If blocked, may stop on the way Stop here

Part 1: KnightFish Complicated behavior Procedural programming: nested if-statements OOP: nested visitors Visitor-Based Delegation Model Process flow diagramming makes designing complex algorithms a systematic process Cannot forget to handle a situation (compiler error!)

Part 2: WrappingEnv Grid-based, bounded, and rectangular environment If the fish leaves on one side, it re-enters from the other side (toroidal)

Part 2: WrappingEnv Students learn To reuse existing code by subclassing To integrate new code into a framework Students’ code still based on existing code But cannot simply be copied and modified anymore

Part 3: Internals Code missing in several places of the framework Students reimplement critical portions Gives students a tour of the entire framework Unit tests provide guidance Error messages in plain English

Part 3: Internals Students gain insight into Abstraction and loose coupling Message passing Writing large frameworks Working with someone else’s code Requires extensive work within existing framework

Part 4: Behavior Strategies Once students have understood the existing framework, they can improve it Point out one of the flaws Fish cannot change behavior This part involves refactoring the old code and creating a new class hierarchy

Strategy Pattern + void move() Static Behavior! Separate the variants from the invariants Part 4: Behavior Strategies

Students have the opportunity to Apply design patterns to improve the project Refactor a substantial portion of the code Experience how loose coupling makes this easy Requires new design and code that augments existing framework

Summary Students slowly gain experience with the framework Parts 1 and 2 provide a lot of support Part 3 gives students more responsibility, but unit tests provide guidance Part 4 gives students freedom to design and improve Compelling and entertaining example of object-oriented design

Niftiness Large, non-trivial project Focus on the design of OO systems Flexible yet secure design Can be used for other applications, e.g. OS Test-driven development Provides feedback, but not the answer

Niftiness Requires broad set of skills Flexibility and extensibility reinforce power of OO design Entertaining, visual project Inheritance, delegation Unit testing Reading and writing documentation Design patterns Refactoring Components and frameworks

Assignments in Objects-First Assignments have to be rich and deep Highlight benefits of object-orientation Large design portion Find proper abstractions, variants / invariants Solve family of problems Challenge to find suitable assignments Must be within students’ grasp Milestone 2 due today!

The Culmination of a Unified OO Pedagogy Abstract Structure and Behavior Polymorphism Design Patterns Unit Tests MBS ~ end of 2 nd semester.