DAAD project “Joint Course on OOP using Java” On Object Oriented modeling in Java (Why & How) Ana Madevska Bogdanova Institute of informatics Faculty of.

Slides:



Advertisements
Similar presentations
Framework is l Reusable Code, often domain specific (GUI, Net, Web, etc) l expressed as l a set of classes and l the way objects in those classes collaborate.
Advertisements

IVANA NIŽETIĆ Faculty of Electrical Engineering and Computing, University of Zagreb, Croatia Long-lasting teaching materials in spite of changing technology.
SWE 4743 Strategy Patterns Richard Gesick. CSE Strategy Pattern the strategy pattern (also known as the policy pattern) is a software design.
DAAD project “Joint Course on OOP using Java” Development in teaching Design Patterns in the course OOP with Java Ana Madevska Bogdanova Faculty of Computer.
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
Design Patterns Based on Design Patterns. Elements of Reusable Object-Oriented Software. by E.Gamma, R. Helm, R. Johnson,J. Vlissides.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Design Patterns: someone has already.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
INFLUENCE OF UNDERGRADUATE COURSE SOFTWARE DESIGN AND ARCHITECTURE TO POSTGRADUATE COURSE ARCHITECTURE, DESIGN AND PATTERNS Magdalena Kostoska Nevena Ackovska.
Creational Patterns Making Objects The Smart Way Brent Ramerth Abstract Factory, Builder.
COMP 121 Week 02. Agenda Review this week’s expected outcomesReview this week’s expected outcomes Review Guided Learning Activity solutionsReview Guided.
DAAD project “Joint Course on OOP using Java” Design Patterns in the course ‘OOP in Java’ - first experiences Ana Madevska Bogdanova Institute of informatics.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented Design.
Chapter 1: Introduction to Design Patterns. SimUDuck Example.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
CS 325: Software Engineering March 17, 2015 Applying Patterns (Part A) The Façade Pattern The Adapter Pattern Interfaces & Implementations The Strategy.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
CSC 211 Introduction to Design Patterns. Intro to the course Syllabus About the textbook – Read the introduction and Chapter 1 Good attendance is the.
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
CS 350 – Software Design The Strategy Pattern – Chapter 9 Changes to software, like other things in life, often focus on the immediate concerns and ignore.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
1 CSC 222: Object-Oriented Programming Spring 2013 Course goals:  To know and use basic Java programming constructs for object- oriented problem solving.
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved COS240 O-O Languages AUBG,
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns VIII Chain of Responsibility, Strategy, State.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
CS 210 Final Review November 28, CS 210 Adapter Pattern.
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
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.
CS 4240: Rethinking Some OOP Ideas and Terms for OOA&D Readings: Chap. 8 in Shalloway and Trott (referred to as S&T in these slides) Wikipedia on information.
CS 210 Introduction to Design Patterns August 29, 2006.
The influence of the new administrative law upon teaching OOP course Ana Madevska Bogdanova Nevena Ackovska University “Sts. Cyril and Methodius”, Skopje,
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.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
Object- oriented Design Principles
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
Duke CPS Programming Heuristics l Identify the aspects of your application that vary and separate them from what stays the same ä Take what varies.
CSC 222: Object-Oriented Programming
CSC 222: Object-Oriented Programming
SE 461 Software Patterns Welcome to Design Patterns.
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
Design Patterns: MORE Examples
CompSci 280 S Introduction to Software Development
Strategy Design Pattern
Strategy Pattern.
Introduction to Design Patterns
Chapter Nine The Strategy Pattern
Behavioral Design Patterns
CMPE 135: Object-Oriented Analysis and Design October 24 Class Meeting
CSC 222: Object-Oriented Programming
Reference: COS240 Syllabus
Strategy Design Pattern
Presented by Igor Ivković
Chapter 10 Thinking in Objects
Object Oriented Practices
Advanced Programming Behnam Hatami Fall 2017.
Object-Oriented Programming
Ms Munawar Khatoon IV Year I Sem Computer Science Engineering
DESIGN PATTERNS : Strategy Pattern
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
CS 2530 Intermediate Computing Dr. Schafer
Presented by Igor Ivković
Object Oriented Design & Analysis
Software Design Lecture : 27.
Logical Architecture & UML Package Diagrams
Presentation transcript:

DAAD project “Joint Course on OOP using Java” On Object Oriented modeling in Java (Why & How) Ana Madevska Bogdanova Institute of informatics Faculty of Natural Sciences and Mathematics Skopje, Macedonia

DAAD project „Joint Course on OOP using Java“ © 2 Agenda  The motivation  The need of introducing design patterns in the first year of studies  Incorporation in the concepts of the existing OOP course  Expected results

DAAD project „Joint Course on OOP using Java“ © 3 The motivation  To start earlier with Java (DSA will improve)  To introduce design patterns in OOP

DAAD project „Joint Course on OOP using Java“ © 4 The motivation  The first two courses Structured programming Object oriented and visual programming  C++ is the represent of a OOP language  The second course Encaptulation Inheritance Polymorphism

DAAD project „Joint Course on OOP using Java“ © 5 Where is Java in the curriculum?  Java is in the course Data Structures and Algorithms Third semester The course is too much Introductory level of Java while listening to the theory about Data structures  Discrepancy between programming the data structures and the theory  Solution?

DAAD project „Joint Course on OOP using Java“ © 6 The solution  We will introduce Java in the second semester within the course OO programming The students are ready to start to program data structures immediately within the course DSA No discrepancy

DAAD project „Joint Course on OOP using Java“ © 7 Agenda  The motivation  The need of introducing design patterns in the first year of studies  Incorporation in the concepts of the existing OOP course  Expected results

DAAD project „Joint Course on OOP using Java“ © 8 Another existing problem…  Thinking in the design pattern level  Introduced in the course of software engineering in the 5 th semester Software design and architecture  In the first two programming courses the students mind is focused only on technical clarity in developing the OO system

DAAD project „Joint Course on OOP using Java“ © 9 Idea – introduce design patterns in the first semester  In the OO programming course we can introduce some problems and discuss them with the students How to create OO model – to go through the process OO modeling

DAAD project „Joint Course on OOP using Java“ © 10 Why do that?  Till now We give them ready OO model and ask the students to program it and use -Encaptulation -Polymorphism -Inheritance  New idea Ask the students to BUILD the OO model for a given problem To broaden their point of view for the proper programming To be ready to learn more design patterns in the latter courses

DAAD project „Joint Course on OOP using Java“ © 11 The levels  1. OO basics encapsultion, polymorphism, inheritance  2. OO principles  3. OO patterns 1. Strategy -Defines a family of algorithms, encapsulates each one, and makes them interchangable - let the algorithm vary independently from clients that use it

DAAD project „Joint Course on OOP using Java“ © 12 Why design patterns?  This is what the students should learn in the first year of their studies.  Students learn that applying design patterns is like reusing experience. One can apply successful patterns to develop new software without reinventing new solution strategies.

DAAD project „Joint Course on OOP using Java“ © 13 How to do that?  Teach Java course -Encaptulation -Polymorphism -Inheritance  Go further Introduce a design pattern Give a problem -Start with straightforward model -Change something -Remodeling -… solution would be one of the design patterns

DAAD project „Joint Course on OOP using Java“ © 14 Agenda  The motivation  The need of introducing design patterns in the first year of studies  Incorporation in the concepts of the existing OOP course  Expected results

DAAD project „Joint Course on OOP using Java“ © 15  The idea is to learn ONE design pattern  Starting from scratch  Choosing interesting problem Discuss with the students every step of developing the model by putting different subproblems as new requirements for the model The model must develop with the new requirements

DAAD project „Joint Course on OOP using Java“ © The strategy pattern  The idea is to guide the student through the process of implemeting the right Pattern Design to create the right OO model for the given problem.  Along the way they will understand the main OO principles - why to develop the software in that particular way 1. Encapsulate what varies 2. Program to interfaces, not implementation 3. Favor composition over inheritance

DAAD project „Joint Course on OOP using Java“ © 17 Simple problem  We chose a simple problem  To explain the students that the only thing that we can be certain about - is the change in every software development  No matter how well one designs an appliication, it must grow and develop over time  So, the first design pattern is about flexibility in the OO model

DAAD project „Joint Course on OOP using Java“ © 18 Inheritance?  To point the student that inheritance doesn’t always work well Request - the behavior keeps changing across the subclasses, and it is not appropriate every subclass to have that behavior.

DAAD project „Joint Course on OOP using Java“ © 19 The FIRST design principle  Part of code that changes New requirements It is a behavior that should be parted from the rest of the code  SO, the students should identify the aspects of the application that vary and separate them from the parts that don‘t change “encapsulate “ it so it won‘t affect the rest of the code  The result is Less unintended consequences when changing the code More flexibility in the system

DAAD project „Joint Course on OOP using Java“ © 20 The SECOND design principle  We introduce another design principle  Program to an interface, not the implementation  The different behaviors will live in a separate classes  That way, the classes won‘t need to know any of the implementation details for their own behaviors

DAAD project „Joint Course on OOP using Java“ © 21 The realization  We will use an interface to represent each behavior and each implementation of the behavior will implement one of those interfaces.  Program to an interface really means program to a supertype  The concept of interface must not to be mixed up with the JAVA construct interface.  You can program to an interface, withouth using the actual construct interface.  We want to exploit polymorphism

DAAD project „Joint Course on OOP using Java“ © 22 Another difference with the current OOP course  We also plan to extend the knowledge of the students about the class relations in order to build more flexible models  Discovering class relations Association Aggregation and Composition Inheritance (revisited)

DAAD project „Joint Course on OOP using Java“ © 23 Has-A can be better that Is-A  The THIRD design principle  Instead of inheriting a certain behavior, the objects get their behavior by composing with the right behavior object.  The students learn the third design principle …favor composition over inheritance …creating systems using composition provides a great deal of flexibility.

DAAD project „Joint Course on OOP using Java“ © 24 Agenda  The motivation To start earlier with Java (DSA will improve) introducing design patterns  The need of introducing design patterns in the first year of studies  Incorporation in the concepts of the existing OOP course  Expected results

DAAD project „Joint Course on OOP using Java“ © 25 Expected results of introducing JAVA and design patterns in JAVA  As mentioned in the motivation part More prepared students to embrace the higher level of producing OO modeling early - in their first OO course They will be ready to learn more OO design patterns in the latter courses Ready to develop OO models on their own in the different courses in the latter semesters. learning JAVA in this course will make DSA course more comprehendible in the third semester -Students wouldn't have to learn the basics of JAVA, they will use it for simulating data structures covered with the course

DAAD project „Joint Course on OOP using Java“ © 26  Thank you for your attention