Design Patterns in the course - PowerPoint PPT Presentation

About This Presentation
Title:

Design Patterns in the course

Description:

Design Patterns in the course OOP in Java - first experiences Ana Madevska Bogdanova Institute of informatics Faculty of Natural Sciences and Mathematics – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 31
Provided by: C547
Category:

less

Transcript and Presenter's Notes

Title: Design Patterns in the course


1
Design Patterns in the course OOP in Java -
first experiencesAna Madevska
BogdanovaInstitute of informaticsFaculty of
Natural Sciences and MathematicsSkopje, Macedonia
2
Agenda
  • The motivation
  • The need of introducing design patterns in the
    first year of studies
  • Incorporation of the design patterns in the
    concepts of the existing OOP course
  • Expected results

3
The motivation(last year)
  • We had a problem with the course Data Structures
    and Algorithms (DSA) - third semester
  • in the same course
  • First learn Java
  • Then data structures in Java
  • The reality (till last year)
  • The first two courses in the first year
  • I. Structured programming (C)
  • II. Object oriented and visual programming (C)
  • The second course, OOP
  • Encaptulation
  • Inheritance
  • Polymorphism
  • Solving problems coding when given OO Design -
    scheme

4
The solution of the problem
  • Last semester
  • We introduced Java in the course Object oriented
    and visual programming
  • It is THE first OOP course
  • It is the second semester

5
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

6
Another existing problem
  • Thinking in the design pattern level
  • Introduced in the course of software engineering
    in the 5th 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

7
Introducing design patterns in the first semester
  • What if we introduce DP in the FIRST semester?
  • Last years idea
  • 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 of OO modeling
  • To broaden their point of view for the proper
    programming
  • To be ready to learn more design patterns in the
    latter courses

8
The realization of the idea
  • NOW
  • 1. the existing course in OO programming is
    shifted towards ? Java.
  • 2. The general plan of the course stayed the same
  • Encapsulation
  • Polymorphism
  • Inheritance
  • With a CHANGE we replaced some topics of the
    previous OOP with C course with the
    introduction of the
  • DESIGN PATTERNS!

9
What did we change with the course?
  • First Learn about
  • Encapsulation
  • Polymorphism
  • Inheritance
  • The introduction of Design Patterns
  • The students were presented a problem and asked
    to BUILD the OO model

10
Agenda
  • The motivation
  • The need of introducing design patterns in the
    first year of studies
  • Incorporation of the concepts in the existing OOP
    course
  • Expected results

11
Some facts
  • The design pattern part was incorporated in the
    last 5 classes of the course.
  • By that time students had the opportunity to
    experience the OO programming
  • Programming in NetBins environment

12
The levels of the OOP with Java - course
  • 1. OO basics
  • encapsultion, polymorphism, inheritance,
  • also interfaces, downcasting, exceptions
  • 2. OO principles
  • 3. Introducing the OO design 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

13
How we did that?
  • So, after the common Java beginners course
  • Introduction of the DESIGN PATTERNS
  • 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

14
1. The Strategy pattern
  • Along the way the students 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

15
Simple problem
  • We chosed 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 design pattern we worked with was about
    flexibility in the OO model

16
Have we succeeded?
  • On every step of the presentation, students were
    asked a question how to proceed.
  • Usually there were 2-3 ideas
  • Additional question leaded to the correct answer
  • The class had a good dynamics, everybody
    understood the story and the line of the
    problems solution.

17
Was there a lot of new material?
  • Almost everything that was needed for the
    introduction of this Pattern Design was already
    incorporated into the course
  • Classes with inheritance
  • Interfaces
  • within the inheritance model
  • The new part
  • The need of building classes of behavior that are
    different for the subclasses from the Problem
    hierarchy
  • New hierarchy of behavioral classes
  • In the subclasses is the different behavior
  • Introduction of variables in the Problem
    hierarchy classes that will connect with the
    classes from the Behavior hierarchy
  • ONLY the last part was a technique that wasnt
    covered in the previous material from the course

18
Agenda
  • The motivation
  • The need of introducing design patterns in the
    first year of studies
  • Incorporation of the concepts in the existing OOP
    course
  • Expected results

19
Facts
  • Till last year C
  • This year Java
  • Different students
  • The number of measured results (from the Javas
    exams) is not statistically significant.

20
Two ways of measuring the results
  • 1. Too few data at the presenters disposal
  • Students results
  • 2008, 2009 with C
  • 2010 with Java, still not finished with the exams
  • No statistical significance in comparing the
    results from different generations
  • The first year students
  • 2 Groups of 80 students
  • 2. Using a questionnaire
  • How did everybody like the introduction to the
    design patterns?
  • The ultimate answer will be answered after the
    next course Software design and architecture
    in their 5-th semester next year

21
The questions
  • 1. What is the level of difficulty of the course
    content?
  • 1(easy) to 5 (very hard)
  • 2. Do you need more previous knowledge to be able
    to understand this part of the course?
  • 3. Was it difficult to learn about a pattern
    design?
  • 4. Was it revealing to go further, not only to
    learn the OOP technique?

22
The questions
  • 1. What is the level of difficulty of the course
    content?
  • 1(easy) to 5 (very hard)
  • 5 15
  • 4 34
  • 3 42
  • 2 9
  • 1 -
  • 2. Do you need more previous knowledge to be able
    to understand DP part of the course?
  • YES 33
  • NO 67

23
  • 3. Was it difficult to learn about a pattern
    design?
  • YES 66
  • NO 34
  • 4. Was it revealing to go further, not only to
    learn the OOP technique?
  • YES 100
  • NO 0

24
In other words
  • 100 - found to be interesting to talk about the
    problem and the DP
  • 85 - could understand the problem and to follow
    the line of the solution
  • 15 - understood the complete DP we worked
    through
  • Including the new elements that werent covered
    in the previous sections of the OOP course
  • The same percentage of students that understand
    ANY new concept when it is introduced for the
    first time

25
About the understanding part
  • Students were asked this questions immediately
    after the finishing of the DP part of the course
  • Bigger percentage of correct answers on the exam
  • After they have studied the problem on their own

26
Expected results of introducing JAVA and design
patterns in JAVA
  • As mentioned in the motivation part
  • 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.

27
Expected results of introducing JAVA and design
patterns in JAVA
  • Learning JAVA in this course will make Data
    Structures and Algorithms 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
  • Next semester (starting this month)
  • we will see if the students are ready to start to
    program data structures immediately within the
    course DSA

28
Conclusions
  • 1. Too few data at the presenters disposal to
    see if this approach (Java Design Pattern) is
    success
  • No statistical significance in comparing the
    results from past generations
  • 2. EASY transition from C to Java
  • 3. The questionnaire has showed that introducing
    the DP has broaden students mind
  • 4. Through right example with the leading from
    the teacher students are able to
  • Understand the problem
  • To see the limitations of the obvious solution
  • To suggest change in the current solution
  • To clarify the right way by discussion and
    clever questions from the teacher
  • Understand the whole process of thinking to come
    to the right solution
  • Hopefully to recognize this pattern in other
    problems and to use this pattern as a solution at
    hand

29
Yet to see if
  • the next course DSA (the following semester)
    will be easier to comprehend
  • OOP will be easier understood with
  • Java
  • or
  • C
  • the SE course where more design patterns are
    thought will be easier to be understand
  • Easier to learn more of Design Patterns

30
  • Thank you!
  • ? ?
Write a Comment
User Comments (0)
About PowerShow.com