Team Member Assessments Preliminary Round Second and Third can Influence Grade CSE 403, Winter 2011, Alverson, Brun.

Slides:



Advertisements
Similar presentations
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Advertisements

Programming Paradigms and languages
Lecture 10: Part 1: OO Issues CS 540 George Mason University.
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Slides prepared by Rose Williams, Binghamton University Chapter 13 Interfaces and Inner Classes.
Interfaces. In this class, we will cover: What an interface is Why you would use an interface Creating an interface Using an interface Cloning an object.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 17 Animated Version Generics and Type Safety.
Design Patterns Introduction. What is a Design Pattern?  A technique to repeat designer success.  Borrowed from Civil and Electrical Engineering domains.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2008 Pearson Education, Inc., Upper.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Comparison of OO Programming Languages © Jason Voegele, 2003.
CISC6795: Spring Object-Oriented Programming: Polymorphism.
Java: Chapter 1 Computer Systems Computer Programming II.
07 Coding Conventions. 2 Demonstrate Developing Local Variables Describe Separating Public and Private Members during Declaration Explore Using System.exit.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
The Procedure Abstraction, Part VI: Inheritance in OOLs Comp 412 Copyright 2010, Keith D. Cooper & Linda Torczon, all rights reserved. Students enrolled.
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Chapter 2 Introducing Interfaces Summary prepared by Kirk Scott.
OOP and Dynamic Method Binding Chapter 9. Object Oriented Programming Skipping most of this chapter Focus on 9.4, Dynamic method binding – Polymorphism.
Refactoring1 Improving the structure of existing code.
Java 5 Part 1 CSE301 University of Sunderland Harry Erwin, PhD.
1/20/03A2-1 CS494 Interfaces and Collection in Java.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
Reasoning about programs March CSE 403, Winter 2011, Brun.
CSE 143 Lecture 24 Advanced collection classes (ADTs; abstract classes; inner classes; generics; iterators) read 11.1, 9.6, , slides.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
Object-Oriented Programming Chapter Chapter
Design patterns (part 2) CSE 331 University of Washington.
Final Review. From ArrayLists to Arrays The ArrayList : used to organize a list of objects –It is a class in the Java API –the ArrayList class uses an.
Polymorphism (generics) CSE 331 University of Washington.
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Refactoring1 Improving the structure of existing code.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
Zach Tatlock / Winter 2016 CSE 331 Software Design and Implementation Lecture 13 Generics 1.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Recitation 7 Godfrey Tan March 21, Administrivia PS6 due Tuesday right after break Final Project descriptions will be handed out Monday after break.
CSC 243 – Java Programming, Spring, 2014 Week 4, Interfaces, Derived Classes, and Abstract Classes.
1 Welcome Alireza Humber College Lecture 1 Game 540 Alireza
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Object Oriented Programming: Inheritance Chapter 9.
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
1 Project 12: Cars from File. This is an extension of Project 11, Car Class You may use the posted solution for Project 11 as a starting point for this.
Data Abstraction: The Walls
CSE 403 Design Patterns.
Interface Java 7 COMP T1.
CSE 331 Software Design & Implementation
Interfaces and Inheritance
Java Programming Language
Improving the structure of existing code
Dynamic Data Structures and Generics
Interfaces.
slides created by Marty Stepp and Hélène Martin
Presentation transcript:

Team Member Assessments Preliminary Round Second and Third can Influence Grade CSE 403, Winter 2011, Alverson, Brun

Self and Team Member Assessments Why? o To reflect yourself on your contributions to-date. o To hear how others perceive your contribution and to be applauded, learn and improve based on their (averaged) feedback

Confidentiality Individual values are kept in strict confidence How it works: o Split 100 points across your team – you decide how o Add comments for each teammate o Gail/Yuriy average the numerical value, and put this in the gradebook – private to each student o Comments will be used by the staff and summarized for students only at the extremes o Nothing is passed directly from the survey to students

Things to consider Preparation – Were they prepared when they came to team meetings/work sessions? Contribution – Did they contribute productively to team discussions and assignments? Respect for others’ ideas – Did they encourage others to contribute their ideas? Flexibility – Were they flexible when disagreements occurred? Responsibility - Were they responsible members of the team in terms of communication and commitments? Consider also any ground rules or responsibilities you may have discussed and agreed on as a team

Survey is due Monday Survey links are on the class home page Complete by Monday at 11pm -- Required

Design Patterns January 28, 2011 CSE 403, Winter 2011, Brun Creational, Structural, Behavioral

Crystal

Why use Crystal? Prevent conflicts Tells you when to communicate to avoid problems

Tools we’ll need Crystal Dropbox Mercurial

What’s hard about Crystal? The set up is awkward Beta release might contain bugs But, you have access to the developer

Steps to setting up Crystal 1.set up dropbox account 2.set up dropbox folder 3.set up hg repository clones 4.set up Crystal configuration

Step 1: set up dropbox account 1.Go to 2.Set up free account. if you want, you can invite each other to get more free space.

Step 2: set up dropbox folder 1.Create a project folder and share it with your group members. 2.In the project folder, create a folder for each group member and one for master.

Step 3: set up hg repository clones 1.Put the master in the master folder 2.Each group member: make a clone of the master in your folder (one person can do this for everyone) You now can see everyone’s code versions

Step 4: set up Crystal configuration Create a ~/.conflictClient.xml file

Now just run Crystal Download the jar: Run If you make changes to the ~/.conflictClient.xml file, restart Crystal

Design patterns outline Introduction to design patterns Creational patterns (constructing objects) Structural patterns (controlling heap layout) Behavioral patterns (affecting object semantics)

What is a design pattern? a standard solution to a common programming problem –a design or implementation structure that achieves a particular purpose –a high-level programming idiom a technique for making code more flexible –reduce coupling among program components shorthand for describing program design –a description of connections among program components –the shape of a heap snapshot or object model

Example 1: Encapsulation (data hiding) Problem: Exposed fields can be directly manipulated – Violations of the representation invariant – Dependences prevent changing the implementation Solution: Hide some components – Permit only stylized access to the object Disadvantages: – Interface may not (efficiently) provide all desired operations – Indirection may reduce performance

Example 2: Subclassing (inheritance) Problem: Repetition in implementations – Similar abstractions have similar members (fields, methods) Solution: Inherit default members from a superclass – Select an implementation via run-time dispatching Disadvantages: – Code for a class is spread out, and thus less understandable – Run-time dispatching introduces overhead

Example 3: Iteration Problem: To access all members of a collection, must perform a specialized traversal for each data structure – Introduces undesirable dependences – Does not generalize to other collections Solution: – The implementation performs traversals, does bookkeeping – Results are communicated to clients via a standard interface Disadvantages: – Iteration order is fixed by the implementation and not under the control of the client

Example 4: Exceptions Problem: – Errors in one part of the code should be handled elsewhere. – Code should not be cluttered with error-handling code. – Return values should not be preempted by error codes. Solution: Language structures for throwing and catching exceptions Disadvantages: – Code may still be cluttered. – It may be hard to know where an exception will be handled. – Use of exceptions for normal control flow may be confusing and inefficient.

Example 5: Generics Problem: – Well-designed data structures hold one type of object Solution: – Programming language checks for errors in contents – List instead of just List Disadvantages: – Slightly more verbose types

Creating generic classes Introduce a type parameter to a class – public class Graph implements Iterable { – private final Map > node2neighbors; – public Graph(Set nodes, Set > edges) { –... – } – public interface Path > – extends Iterable, Comparable > { – public Iterator iterator(); – } Code can perform any operation permitted by the bound

Tips for designing generic classes First, write and test a concrete version – Consider creating a second concrete version Then, generalize it by adding type parameters – The compiler will help you to find errors

A puzzle about generics Integer is a subtype of Number List is not a subtype of List – Compare specs: add(Integer) is not stronger than add(Number) – What goes wrong if List is a subtype of List ? – List li = new ArrayList (); – // legal if List is subtype of List – List ln = li; – ln.add(new Float()); – li.get(0); // we got a Float out of a List ! Integer[] is a subtype of Number[] – Can we use similar code to break the Java type system?