«Home

Oop: Encapsculation,implementation And Abstraction What Are They?

Plz I need explanation of this three terms of OOP: Encapsculation,Implementation and Abstraction. I have being reading it but find it difficult to understand. Plz if u can with simples example depicting what will happen for me to say that any three of then has taken place.

Avatar
Newbie
11 answers

first of all @parosky, you sound like a great programmer/teacher. I'm highly impressed by the pounded yam analogy.

@luckyCO, here's what I think is an easier way of understanding delegates.

Normally one can declare variable of certain types which means you can put any data of that type in that variable.

e.g Dim I as integer means you can put any integer value in I.

Delegate are like variable but instead of holding normal values, they hold methods(subroutines or functions in VB)

You can assign any method that has the same signature as the delegate to the delegate.

You can then call the method by calling the "invoke" function of the delegate.

To put it short, delegates are variables that hold subroutine and functions.

In C++ they are called function pointers.

0
Avatar
Newbie

Now i like wats going on here. All the analysis and explanation have been d best. Y havent we craeted our own Software yet to the global market.

0
Avatar
Newbie

Looking at CommandButton it likes like buton,Textbox the same. In Vb.net how can I build my own custom control and make it have any Icon or picture I want it to have?

I know how to write custome controls atleast can do something. But after building mine it will display in toolbox as if it is system file.

Plz I need help.

0
Avatar
Newbie

My2cents

You no serious! Why not go to Jokes forum and post this, I think people will laugh for you. Wel your posting makes sense but harness it more for simple man to understand just like parosky

0
Avatar
Newbie

My2cent give us ur own analogy, don't abuse that fine example

0
Avatar
Newbie

Serialization means to force one-at-a-time access for the purposes of concurrency control, or to encode a data structure

as a sequence of bytes. In the Java world, serialization is the storing of an object's current state on any permanent

storage media for later reuse. This is done using when you use the seriazlizable interface or when using the

ObjectOutputStream and ObjectInputStream classes.

In object-oriented programming there are two related notions of delegation.

Most commonly, it refers to a programming language feature making use of the method lookup rules for dispatching so-

called self-calls as defined by Lieberman in his 1986 paper "Using Prototypical Objects to Implement Shared Behavior in

Object-Oriented Systems".

In its original usage, delegation refers to one object relying upon another to provide a specified set of functionalities. In

research, this is often referred to as consultation or as aggregation in modeling.

Interestingly, despite delegation being fairly widespread, no major programming languages implement delegation as an

alternative model to static inheritance. The Self programming language incorporates the notion of delegation through its

notion of mutable parent slots which are used upon method lookup on self calls.

0
Avatar
Newbie

parosky or any other person who knows it

Plz can you help explain delegates and serialization. What are they for and what can I do with them?

0
Avatar
Newbie

Men parosky u have illustrated Abstraction and Encapsulation in a very good way.

i am very amazed by such extent of reasoning.

thumbs up.

keep it up.

0
Avatar
Newbie

parosky, you are a pounded yam stew encapsulation, abstration and implementation genius. You couldn't have explained it better, well done.

0
Avatar
Newbie

Thanks a lot man. So it is what am being doing all the while while building my class in .Net. It is good to ask questions. Somebody called for .Net lectures that is why I need to know their explanation. Thanks a million.

0
Avatar
Newbie

Imagine you work in a canteen in the stew making unit, you have your recipe(CLASS) for making stew. Your colleague who is in pounded yam making unit also have recipe for pounded yam. Same goes for every other unit. Once all the units have done their jobs very well, all the waiters need to do is get their trays, go to pounded yam unit , get 2 wraps (OBJECT) of pouded yam for a customer, go to stew making unit for a bowl of soup, meat making unit for 3 pieces of meat. The waiters don't need to know the various steps taken in pounded yam unit to get things done. That is, the complexities of how they (pounded yam unit) get things done is hidden from you guys in stew, soup, amala, eba making unit. This is ABSTRACTION.

In pounded yam unit , they get raw yam, peel it cook it, pound it,and so on but it is not your concern. They add water if they think it is not soft enough for good eating but you don't need to know that. By the time the finish their job, you won't have the opportunity to peel yam, cook it, pound it (controlled by FIELDS, PRIVATE, MEMBER VARIABLES). But you can open the wrap, take a bolus, mold it, check the softness, put it in stew, swallow it. In short you are able to interact with pounded yam (through it's PUBLIC MEMBERS - PROPERTIES and METHODS that was exposed , in this case the pounded yam itself) without knowing how  it's prepared (or it's IMPLEMENTATION) but not with it's fundamental preparation process because it has been ENCPSULATED. 

Does Abstraction and encapsulated look like the same to you? Well they really are not but close enough.

0
Avatar
Newbie
Your answer
Add image

By posting your answer, you agree to the privacy policy and terms of service.