Results 1 to 1 of 1
- 07-26-2013, 05:04 AM #1Banned
- Join Date
- Jul 2013
- Rep Power
Emulating Multiple Inheritance in Java using 'Program To Interface' Design Principle,
Emulating Multiple Inheritance in Java using 'Program To Interface' Design Principle, Object Composition and Method Delegation
In this post I will demonstrate the use of ?Program To Interface? Design Principle and Object Composition, to emulate Multiple Inheritance in Java. For a refresher on these topics, there?s a very informative post on Artima Developer where Erich Gamma, co-author of the landmark book, Design Patterns, talks with Bill Venners about two design principles: program to an interface, not an implementation, and favor object composition over class inheritance.
For our example, consider different type of Employment Roles available in a typical Software Consulting Firm. To simplify things a bit, assume there are 4 roles; Developer, Tester, Architect and Project Manager. All of these are Employee(s) of the Software Consulting Form i.e. the employer.
Click here to Read More
Subscribe to Code Of The Day via: RSS Feed | Google Friend Connect
- By Zulkifli_Rahman in forum New To JavaReplies: 1Last Post: 07-08-2012, 05:23 PM
- By rmh636 in forum New To JavaReplies: 2Last Post: 02-11-2010, 08:53 AM
- By McChill in forum New To JavaReplies: 2Last Post: 03-04-2009, 03:53 AM
- By pawanspace in forum New To JavaReplies: 2Last Post: 12-31-2007, 05:08 AM
- By paty in forum New To JavaReplies: 4Last Post: 08-02-2007, 02:25 PM