Design Patterns: What is a type

Posted by contactmatt on Stack Overflow See other posts from Stack Overflow or by contactmatt
Published on 2010-12-28T05:53:50Z Indexed on 2010/12/28 9:54 UTC
Read the original article Hit count: 273

Filed under:
|
|

A very basic question, but after reading the "Design Patterns: Elements of reusable OO Software" book, I'm a little confused.

The book states,

"An object's type only refers to its interface-the set of request to which it can respond. An object can have many types, and objects of different classes can have the same type."

Could someone please better explain what a Type is? I also don't understand how one object can have multiple types...unless the book is speaking of polymorphism....

© Stack Overflow or respective owner

Related posts about design

Related posts about design-patterns