Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Welcome Alireza Humber College Lecture 1 Game 540 Alireza

Similar presentations


Presentation on theme: "1 Welcome Alireza Humber College Lecture 1 Game 540 Alireza"— Presentation transcript:

1 1 Welcome Alireza Humber College Lecture 1 Game 540 Alireza http://mycourses.humber.ca alireza@cse.yorku.ca alireza.moghaddam@humber.ca

2 2 Assignments, Labs, Practice Tests, Quiz, Exam Course Material

3 3 Grading Scheme Assignments: 4 x 5.5% = 22% Labs: 12 * 1.5 = 18 % Quiz: 5 x 2% = 10% Mid-Term: 20% Final: 30%

4 4 I think it is important for people to not feel isolated with the material. Together

5 5 The best way to learn Design Patterns is to practice! Together

6 6 Office Hours Thursdays 12:00 – 13:00

7 7 Together Ask me anything! Class material Help YOU solve the assignment questions. Material missed from previous courses

8 8 Before reading the solutions to the assignments. Useful Learning Techniques Work hard on solving them on your on. Study the text and slides. Get help, but not answers from friends, Instructor, …

9 9 After reading the solutions to the assignments. Useful Learning Techniques Study the solutions. Understand the solutions. Memorize the solutions. The questions on the tests will be different. But the answers will be surprisingly close.

10 10 Please ask questions! Useful Learning Techniques

11 11 Learning Outcomes To identify design patterns in OO programs To apply design patterns in OO programs To explain importance of software testing To distinguish different forms of testing To prepare a test plan

12 12 Introduction to Design Patterns Design Pattern: Is a pattern that uses classes and their methods in OO language. Design Patterns are a level up from code representing an algorithm of how to achieve a goal. A design pattern represents an idea but not an implementation. Design pattern help us to develop applications that are more efficient.

13 13 Categorization of design patterns Interfaces Responsibility Construction Operations Extensions

14 14 Categorization of design patterns

15 15 Interfaces and Abstract Classes Interface: Represents a commitment that the methods will perform the operation implied by their names as specified by code comments, tests and other documentations. Implementing an interface: The implementer of an interface is obliged to fulfill the pre/post conditions of the methods of an interface. Java permits a class to implement any number of interfaces but to extend only one abstract class. Smalltalk and C++ do not have interface construct

16 16 Interfaces vs. Abstract Classes Java permits a class to implement any number of interfaces but to extend only one abstract class. All methods of an interface are abstract. Abstract class can use fields, but interface can only use constants. Abstract class can define constructor, but an interface can not. An abstract class can have methods with protected and private access, but interface’s methods are implicitly public.

17 17 Composition Represents ‘is a part of’ relationship Member object can not exist by itself without enclosing class Example: CSE department ‘is a part of’ HUMBER college. Both have the same lifetime

18 18 Aggregation Represents ‘has a’ relationship Member object can exist by itself without enclosing class Example: Room ‘has a’ table. Each object may have different lifetimes.

19 19 Next Session Favoring composition over inheritance Adapter design pattern Facade design pattern


Download ppt "1 Welcome Alireza Humber College Lecture 1 Game 540 Alireza"

Similar presentations


Ads by Google