aspose file tools*
The moose likes Beginning Java and the fly likes A small tips on PIE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A small tips on PIE" Watch "A small tips on PIE" New topic
Author

A small tips on PIE

Wahid Sadik
Ranch Hand

Joined: Oct 30, 2000
Posts: 56
Hi guys..
I always to tend for get the 3 basic properties of OO...
Luckly I found an acronym to help me to remember the keywords.. it is PIE
P - Polymorphism
I - Inheritance
E - Encapsulattion
You should reverse PIE as IEP so that you get them properties according to importance i.e. Encapsulattion, Inheritance and Polymorphism...
Hope it helps other guys who are confused like me


Regards<br />Mohammod Wahid Sadik<br />SCJP 1.2, SCJD 1.4,<br />IBM Certified XML Developer<br />IBM Certified UML Designer
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

You should reverse PIE as IEP so that you get them properties according to importance i.e. Encapsulattion, Inheritance and Polymorphism

It doesn't make sense to order them by "importance". These properties are orthogonal. One could make an argument that polymorphism is possible because of inheritance, but conceptualy, all three properties characterize different aspects of OO, there is no such thing as more or less important property.
Eugene.
Wahid Sadik
Ranch Hand

Joined: Oct 30, 2000
Posts: 56
Hi Eugene,
Thanks a lot for your information... i didn't know that... i found them in the same order in several books...
Thanks again...
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
That's a nice tip Wahid. Tell you what, send it to bert.bates@wickedlysmart.com , he may want to use it in a book being written. You will then see your name in print if they use your tip.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
The order you find them in books may also be the order it's easiest to teach them in. As Eugene notes, you can't really have polymorphism without inheritance, so it makes sense that they'd discuss inheritance first. Furthermore you need to have some idea what an instance is before you can understand polymorphism - and learning about encapsulation is a good way to introduce the notion of an instance. As for encapsulation vs. inheritance - I'd expect encapsulation to be taught first, but I suppose it's possible to discuss inheritance first if you're talking about static methods. Seems wierd though.
Incidentally, Peter van der Linden's excellent Just Java 2 cites four key OO concepts - including Abstraction - and suggests the mnemonic "A PIE". But he then discusses them in the order Abstraction, Encapsulation, Inheritance, Polymorphism.


"I'm not back." - Bill Harding, Twister
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
APIE -
abstraction
polymorphism
inheritance
encapsulation

It's in JustJava2 by Peter van der Linden along with discussions of each.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A small tips on PIE
 
Similar Threads
Inheritance vs Aggregation
OOPs concept clarification
one question
MasterExam OO question
What is polymorphism