interface-based object-oriented design and importance of mock objects

13
Interface-Based Object- Oriented Design and Importance of Mock Objects Copyright, 1996 © Dale Carnegie & Associates, Inc. Tameem Ahmad Student M.Tech. Z.H.C.E.T. A.M.U.,Aligarh

Upload: tameem-ahmad

Post on 05-Dec-2014

607 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Interface-Based Object-Oriented Design and Importance of Mock Objects

Interface-Based Object-Oriented Design and Importance of Mock Objects

Copyright, 1996 © Dale Carnegie & Associates, Inc.

Tameem Ahmad

StudentM.Tech.

Z.H.C.E.T.A.M.U.,Aligarh

Page 2: Interface-Based Object-Oriented Design and Importance of Mock Objects

2

References:Jagadeesh Nandigam, Venkat N Gudivada, Abdelwahab Hamou-Lhadj and Yonglei Tao “Interface-Based Object-Oriented Design with Mock Objects”, Sixth International Conference on Information Technology: New Generations, 2009.

Alexandre Chureau, Yvon Savaria and El Mostapha Aboulhamid “Interface-based Design of Systems-on-Chip using UML-RT”, 4th IEEE International Workshop on System-on-Chip for Real-Time Applications (IWSOC’04).

Rakesh Kumar Mishra and Bharat Lohani, “An Object-Oriented Software Development Approach to Design Simulator for Airborne Altimetric Lidar”,

Page 3: Interface-Based Object-Oriented Design and Importance of Mock Objects

3

Page 4: Interface-Based Object-Oriented Design and Importance of Mock Objects

4

Page 5: Interface-Based Object-Oriented Design and Importance of Mock Objects

5

Overview

Interfaces

Mock Objects

Practicing Interface-Based Approach in OOAD

My Enhancement in the Interface-Based

Design

Conclusion

Page 6: Interface-Based Object-Oriented Design and Importance of Mock Objects

6

What are the

interfaces???

Why it is important???

How we can do this???

Interfaces

Page 7: Interface-Based Object-Oriented Design and Importance of Mock Objects

7

Interfaces: (Continued)In object-oriented programming languages, an interface is a

language construct that specifies the expected behavior of an

object as a set of operation/method signatures.

A method signature usually includes the method name, order,

and type of its parameters, and its return type.

Page 8: Interface-Based Object-Oriented Design and Importance of Mock Objects

8

Interfaces: (Continued)

Page 9: Interface-Based Object-Oriented Design and Importance of Mock Objects

9

Interfaces: (Continued)With careful use of interfaces, we can decouple classes in our system.program to an interface, not an implementation.

flexibility (gracefully accommodating changes in direction), extensibility (gracefully accommodating addons),pluggability (gracefully substituting objects that have identical interfaces for each other at run-time using dynamic binding and polymorphism)

Page 10: Interface-Based Object-Oriented Design and Importance of Mock Objects

10

Interfaces: (Continued)

Page 11: Interface-Based Object-Oriented Design and Importance of Mock Objects

11

Mock ObjectsIn object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways.It is not that developing interface-based design depends on mocks, but using mocks in software development forces one to develop code that is interface-based, loosely coupled, and where object composition via interfaces is favored.

Page 12: Interface-Based Object-Oriented Design and Importance of Mock Objects

12

My Contribution:

Design reuse Easier exploration of the design space

Page 13: Interface-Based Object-Oriented Design and Importance of Mock Objects

13

Thank You