Click here to Skip to main content
15,917,709 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want to ask some questions related to OOP,I have read many articles but still confused. Kindly provide description instead of any Link.

1). What is the purpose of Inheritance?Why using Inheritance?
2). What is the purpose of Abstraction?
3). What is the purpose of Abstraction?
4). What is design pattern? Why using design pattern?
Posted
Updated 27-Aug-13 4:04am
v2
Comments
BotCar 27-Aug-13 10:10am    
This kind of question would probably be better in the Design & Architecture forum, because it makes it easier to have a conversation about the topic.
http://www.codeproject.com/Forums/369270/Design-and-Architecture.aspx
Sergey Alexandrovich Kryukov 27-Aug-13 10:45am    
No, such questions are useless in any forum. I tried to explain why in my answer.
And why architecture forum? Yes, this is architecture, but something to be learned by each and every developer.
—SA
BotCar 27-Aug-13 10:53am    
Forum rather than QA, because it would be better to have a conversation about these questions with a back-and-forth about what the OP understand and don't understand.

Design & Architecture because, well, that's the only one I could find in which it would not be completely off topic.
Sergey Alexandrovich Kryukov 27-Aug-13 11:11am    
The question is not off-topic, not at all. It's just ineffective.
And it would be quite off-topic in architecture forum.
—SA
Boipelo 27-Aug-13 12:15pm    
I always recomment this article. Its got all your questions.
http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep

Quote:
1). What is the purpose of Inheritance? Why using Inheritance?
Code re-use.



Quote:
2). What is the purpose of Abstraction?
3). What is the purpose of Abstraction?
Are you asking about 'Abstraction' or 'Iteration'? :-)
'Abstraction' is a powerful tool in any field. You may find a nice explanation of 'abstraction' meaning in computer science in this Wikipedia page: Abstraction (computer science)[^].



Quote:
4). What is design pattern? Why using design pattern?
Again, Wikipedia helps: Software design pattern[^]. You use a design pattern because it is a ready-made, robust solution to a problem.
Please note there is also some criticism on design patterns.
 
Share this answer
 
v2
Comments
ridoy 27-Aug-13 13:08pm    
my 5.
CPallini 27-Aug-13 13:09pm    
Thank you.
BillWoodruff 27-Aug-13 19:11pm    
+5 You responded to the question asked, confused though it may be; and, why shouldn't it be confusing to a newcomer to the strange land of OOP which is not some "perfect Platonic entity," but rather a set of abstractions, principles, and a fuzzy set of practices, all of whose meaning and use are the subject of endless debates :)
CPallini 28-Aug-13 2:13am    
Thank you.
Sergey Alexandrovich Kryukov 27-Aug-13 21:21pm    
All correct, my 5, but... I argued why it might be nearly useless for OP. The whole approach is wrong.
—SA
You can answer this questions by taking some book on programming and reading it while doing some simple programming exercises.

OOP is mostly a single holistic conception which cannot be learned by asking just a few casual questions. Even if you got the answers, it would be an absolute waste of time, as such answers only have values when the relationship with other OOP concepts is revealed. OOP should be learned as one single topic, or not learned at all.

—SA
 
Share this answer
 
Comments
BillWoodruff 27-Aug-13 19:33pm    
"OOP is mostly a single holistic conception which cannot be learned by asking just a few casual questions. Even if you got the answers, it would be an absolute waste of time, as such answers only have values when the relationship with other OOP concepts is revealed. OOP should be learned as one single topic, or not learned at all."

Utter neo-Platonic nonsense. If you took this statement as "a logical reality:" then, ispo facto, you could never "learn" OOP by taking a book, and doing exercises: in fact you could never learn "it," because this statement embodies Zeno's paradox: "You will never reach point B from point A as you must always get half-way there, and half of the half, and half of that half, and so on."

Using the same logic, I could argue that "OOP" does not exist: because no one could ever have learned it; because no one could have ever invented it :)

See my reply to CPallni's solution below.
Sergey Alexandrovich Kryukov 27-Aug-13 21:19pm    
You are digging too deep. In a way, existing of OOP is a relative thing, so what? Applying Zeno considerations to such a fuzzy matter don't make sense at all.

I'm talking about more practical things. Answering these and only these answers would not promote knowledge of OOP, but could create illusion of knowledge, which is certainly worse than no knowledge at all.

—SA
Hi,here is the link explaining all the concept of OOPS with example

http://www.aspdotnet-suresh.com/2010/04/introduction-to-object-oriented.html


http://msdn.microsoft.com/en-us/library/vstudio/dd460654.aspx

hope this helps...
happy coding :
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900