Unit 15 Java Interfaces: Using an Interface to Accomplish a Specific Goal Kirk Scott.

Slides:



Advertisements
Similar presentations
Collections Chapter Java Collection Frameworks The Java collection framework is a set of utility classes and interfaces. Designed for working with.
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.
Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
More Interfaces, Dynamic Binding, and Polymorphism Kirk Scott.
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Bag implementation Add(T item) – Enlarge bag if necessary; allocate larger array Remove(T item) – Reduce bag if necessary; allocate smaller array Iterator.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Design Patterns Discussion of pages: xi-11 Sections: Preface, Forward, Chapter
Design Patterns in Java Chapter 21 Template Method Summary prepared by Kirk Scott 1.
Data Structures Using C++ 2E
Design Patterns in Java Chapter 13 Flyweight Summary prepared by Kirk Scott 1.
Unit 2 Construction and Cloning Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation, searchnavigationsearch For the Syrian poet,
Chapter 28 Iterator Summary prepared by Kirk Scott 1.
Recursion Chapter 7. Chapter Objectives  To understand how to think recursively  To learn how to trace a recursive method  To learn how to write recursive.
Unit 4 Prototype Summary prepared by Kirk Scott 1.
Iterative Project Management Module 0 – History and Motivation Prepared by Bob Roggio From Forward and Preface of Textbook: Managing Iterative Software.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
Unit 18 Strategy Summary prepared by Kirk Scott 1.
Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
Chapter 2 Introducing Interfaces Summary prepared by Kirk Scott.
CPSC 102: Computer Science II Dr. Roy P. Pargas 408 Edwards Hall Office Hours 10:00-11:00 am MWF 2:00-3:00 pm TTh.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Construction and Cloning Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation, searchnavigationsearch For the Syrian poet, see.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Composite and Related Patterns Kirk Scott. The pitohui, a poisonous bird of New Guinea.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5: Algorithms Computer Science: An Overview Tenth Edition by J. Glenn.
Template Methods Ordering What We Do. Example - Solitaire Initialization of many solitaire games follow this pattern: Shuffle the cards Layout the game.
Chapter 7: The Adapter Pattern. Object Oriented Adapters Suppose that you have existing software. You have outsourced some of your work and there is a.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
Computer Science 101 Fast Algorithms. What Is Really Fast? n O(log 2 n) O(n) O(n 2 )O(2 n )
Chapter 8 Testing. Principles of Object-Oriented Testing Å Object-oriented systems are built out of two or more interrelated objects Å Determining the.
OOP (Object Oriented Programming) Lecture 1. Why a new paradigm is needed? Complexity Five attributes of complex systems –Frequently, complexity takes.
N. HARIKA Lecturer(csc). 3 General Structure Of A Java Program.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Collections Using Generics in Collections. 2 Chapter Objectives Define the concept and terminology related to collections Explore the basic structure.
Chapter Overview  Discusses how to construct an introduction to an epideictic address  Describes the primary method for organizing the body of an epideictic.
Overview of Behavioral Patterns ©SoftMoore ConsultingSlide 1.
Grain © Grain Chain Grain Activity session 1 Grain Do you know what each of these grains is called?
Design Pattern Introduction in Data Structures Purpose  Natural integration of patterns into data structures education Plan  Cover traditional topics.
Summary prepared by Kirk Scott
Generic Interfaces and Encapsulation, a Class in the Middle
Recursion Topic 5.
Design Patterns in Java Chapter 23 Strategy
Chapter 10 Design Patterns.
Common Design Patterns
Introduction to Design Patterns
Unit 11 Generic Interfaces and Encapsulation, Continued
More Interfaces, Dynamic Binding, and Polymorphism
Final Exam Study Guide This test will cover Chapters 1-13 in the course book. Review each lecture slide and class notes to narrow your focus of study for.
Java Interfaces: Using an Interface to Accomplish a Specific Goal
Java Interfaces: Using an Interface to Accomplish a Specific Goal
Food and Beverage Service
1.#.
Object-Oriented Programming
Chapter 12 Collections.
Object Oriented Design Patterns - Behavioral Patterns
Groups: Part 1.
Programming Languages
Chapter 12 Collections.
Information Hiding and Encapsulation Section 4.2
Presentation transcript:

Unit 15 Java Interfaces: Using an Interface to Accomplish a Specific Goal Kirk Scott

Barley From Wikipedia, the free encyclopedia Jump to: navigation, search For other uses, see Barley (disambiguation).navigationsearchBarley (disambiguation)

Barley (Hordeum vulgare L.), a member of the grass family, is a major cereal grain. Important uses include use as animal fodder, as a source of fermentable material for beer and certain distilled beverages, and as a component of various health foods. It is used in soups and stews, and in barley bread of various cultures. Barley grains are commonly made into malt in a traditional and ancient method of preparation. grass familycereal grainfodderbeer distilled beverageshealth foodsbarley breadmalt

This is an introductory unit. These are the units/chapters belonging to this section of the course: Unit 16, Iterator, book chapter 28 Unit 17, Template, book chapter 21 Unit 18, Strategy, book chapter 23

What will be given next is an extremely brief overview of these topics. Although the patterns are different from each other, they can be viewed as having this broad characteristic in common: They make use of an interface to accomplish their goal Iterator and Template both show how to make use of characteristics of the Java API

Iterator Book definition: The intent of the Iterator pattern is to provide a way to access the elements of a collection sequentially Comment mode on: Large parts of this should already be implicitly clear if you understood for each loops You will see that this pattern is used by the Java API in dealing with collection classes

Template Book definition: The intent of the Template pattern is to implement an algorithm in a method, deferring the definition of some steps of the algorithm so that other classes can redefine them. Comment mode on: You will see that the template pattern is used in the Java API to support the ordering and sorting of objects in collection classes

Strategy Book definition: The intent of Strategy is to encapsulate alternative approaches, or strategies, in separate classes that each implement a common operation. Comment mode on: This pattern is actually quite simple You can have multiple classes implementing the same interface—and thus the same method The implementations of the methods may differ in the classes

In Summary and Mnemonic Devices: Iterator: Remember Java collections Template: Remember Java sorting Strategy: Remember multiple classes implementing the same interface

The End