Nifty Assignments: Marine Biology Simulation

Slides:



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

Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
SIGCSE 2005, St. Louis, MO Design Patterns for Recursive Descent Parsing Dung Nguyen, Mathias Ricken & Stephen Wong Rice University.
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.
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
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,
Static and Dynamic Behavior Fall 2005 OOPD John Anthony.
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 ( ) ( ) ( )
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
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.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
Adapted from Prof. Necula UCB CS 1641 Overview of COOL ICOM 4029 Lecture 2 ICOM 4029 Fall 2008.
©Fraser Hutchinson & Cliff Green C++ Certificate Program C++ Intermediate Decorator, Strategy, State Patterns.
CSC 211 Introduction to Design Patterns. Intro to the course Syllabus About the textbook – Read the introduction and Chapter 1 Good attendance is the.
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.
Marine Biology Simulation Part II: Assignment, Milestone 1 Dung “Zung” Nguyen Mathias Ricken Stephen Wong TeachJava 2004! June 25, 2004.
CS 153: Concepts of Compiler Design August 26 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Design Patterns for Marine Biology Simulation Dung “Zung” Nguyen Mathias Ricken Stephen Wong Rice University.
Nifty Assignments: Marine Biology Simulation OOPSLA ‘04 Educators’ Symposium October 25, 2004 Eric Cheng Mathias Ricken Dung “Zung” Nguyen Stephen Wong.
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
Introducing Allors Applications, Tools & Platform.
1 Testing Object- Oriented Programs CS 4311 J. McGregor and D. Sykes. A Practical Guide to Testing Object-Oriented Software, Addison-Wesley, I. Burnstein.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
© 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.
© 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.
Patterns for Decoupling Data Structures and Algorithms or How visitors can help you grow! Stephen Wong, Oberlin College Dung “Zung” Nguyen, Pepperdine.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
CSCI-383 Object-Oriented Programming & Design Lecture 17.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
Principles of Programming & Software Engineering
Design Patterns: MORE Examples
CHAPTER 5 GENERAL OOP CONCEPTS.
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
Principles of Programming and Software Engineering
Design Patterns for Sorting something old in a new light
Types of Programming Languages
Design Patterns for Sorting Teaching something old in a new light
Marine Biology Simulation Part III: Assignment, Milestone 2
Design Patterns for Recursive Descent Parsing
Design pattern Lecture 9.
Marine Biology Case Study Chapter 1 October 28, 2005
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
Marine Biology Simulation Part II: Assignment, Milestone 1
ICOM 4029 Fall 2003 Lecture 2 (Adapted from Prof. Necula UCB CS 164)
OOPSLA ’04 Educator’s Symposium
Presentation transcript:

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

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 http://www.owlnet.rice.edu/~comp202

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

Part 1: KnightFish Randomly pick one of 8 targets 1 2 8 3 7 4 6 5

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

Part 1: KnightFish Complicated behavior Visitor-Based Delegation Model 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 4: Behavior Strategies Static Behavior! Separate the variants from the invariants + void move() Strategy Pattern Dynamic Behavior Change

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

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 MBS ~ end of 2nd semester. Unit Tests Design Patterns Polymorphism Abstract Structure and Behavior