C# Abstraction, Encapsulation, Inheritance, Polymorphism

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 32702 Views - Last Post: 24 April 2013 - 06:04 PM Rate Topic: -----

#1 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 23 April 2013 - 08:23 PM

Question:
is receiving a certificate from a certified ISO company, good?

I just started this online course and it is starting off with some very basic examples that was really easy to understand, but…
Just so I'm very clear on understanding everything, I'd like to ask some questions about how I understand the definitions they gave on:

  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism


Now, I'm sure these are not the only definitions out there. These are just the ones they gave me in this book they gave me.
It is just how I interpreted it and hopefully understood what they were trying telling me.

Any feedback about how maybe I misunderstood how they were defining these four subjects is always welcome, but…
Please remember, try not to go too much into the further depths of the subjects…
I'm just starting out and I want to make sure I understand these "Simple Subjects" before I go on to any more advanced details.
On to it shall we…

Abstraction:The ability to create abstract data objects (classes) that can be used to create instances. (Explained later in the chapter)
How I Interpreted and Understood:
Just basically, programmatically making a call to an outside class and using that class inside your class though way that class was intended to be used.

Encapsulation:Protecting some data members by hiding the implementation and exposing the interface. (Explained later in the chapter)
Just making a call to an outside class and using it the way it was meant to be used. Using it for the reasons it was created.

Inheritance:Reusing the code by specializing classes and adding features to them. (Explained later in the chapter)
This Almost Sounds like you can make a call to an outside class just as well as copying and pasting and actually using the code like it was meant to, but… Maybe add some sort of extra method or property to it. Adding to the code.

Polymorphism:Changing the behavior of the methods of the inherited class. (Explained later in the chapter)
this one also sounds like you can make a call to an outside class or copy and paste as well.
Using only some of the code the way it was meant to be used.
Examples might be: changing the output or the input?

Reading the chapter, it sounds like all of these are somewhat the same with the little tweaks here and there which makes them different.
That's what I'm getting out of it anyway.

It would be nice to hear from some of the old pros, maybe you have another way of explaining what each of these are and do.
Not too deep now, just enough to help me understand. To get the basics.
I'm sure the more I read in my book, more detailed they will go into.

Is This A Good Question/Topic? 0
  • +

Replies To: C# Abstraction, Encapsulation, Inheritance, Polymorphism

#2 Michael26   User is offline

  • Futurama: Insert funny joke here
  • member icon

Reputation: 414
  • View blog
  • Posts: 1,664
  • Joined: 08-April 09

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 23 April 2013 - 11:31 PM

Inheritance
No copy paste, you use what is defined in base class plus a class that inherits that class can make it's own definition on top of the inherited class, kinda like in nature, all mammals are warmblooded, but some mammals(beside that they are warmblooded) walk on two legs some on four

My preferred book on OOP
http://www.amazon.co...d/dp/0672330164

This post has been edited by Michael26: 23 April 2013 - 11:33 PM

Was This Post Helpful? 1
  • +
  • -

#3 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 23 April 2013 - 11:55 PM

View PostMichael26, on 23 April 2013 - 11:31 PM, said:

Inheritance
No copy paste, you use what is defined in base class plus a class that inherits that class can make it's own definition on top of the inherited class, kinda like in nature, all mammals are warmblooded, but some mammals(beside that they are warmblooded) walk on two legs some on four

My preferred book on OOP
http://www.amazon.co...d/dp/0672330164



Building on top of the base class.
So, we as programmers (I'm just a newbie now)… We are already doing this in the first place. Right?
For example:

System.Net;

That would be our base class?

We want to download the source code for our affiliate page.

We would further build on System.Net by adding in some methods like:
HTTP Web Request?

Wouldn't the web request also be considered a base class?

We would be building on top of that, right?

I'm not suggesting that is, just asking.
I'm still learning. Just trying to understand.

I also didn't know where else to post this.
Was This Post Helpful? 0
  • +
  • -

#4 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 12:55 AM

I'm guessing I understood the other three close enough?
Since inheritance was the only one that was commented on.

Just so we're clear, I wasn't suggesting it was copying and pasting.
More like just another form of copying and pasting, but… Doing it programmatically.

Word associations and layman's terms is how I learn best. :smartass:
Baseball is a good subject for the word associations. :dangole:
Was This Post Helpful? 0
  • +
  • -

#5 Michael26   User is offline

  • Futurama: Insert funny joke here
  • member icon

Reputation: 414
  • View blog
  • Posts: 1,664
  • Joined: 08-April 09

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 01:50 AM

You can build on top of the base class or you can make your own.
Everything in .NET is derived from System.Object, this is the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.

Web request class is also derived from somewhere, check the msdn it has very good documentation

And by building on top of that i mean we are using what already exists to make something of our own

This post has been edited by Michael26: 24 April 2013 - 01:54 AM

Was This Post Helpful? 1
  • +
  • -

#6 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 03:27 AM

If you want textbook definitions, you have a textbook.
If you want a tutorial on classes to get an understanding on inheritance check my signature block.
Was This Post Helpful? 0
  • +
  • -

#7 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 04:06 AM

Ah, okay…

"And by building on top of that i mean we are using what already exists to make something of our own"

System.Object is the ultimate base class = foundation at a construction site.
Or
any class that already exists = foundation at a construction site.

Inheritance:
we build on top of those foundations/classes?
we build on top of what's already there?
Was This Post Helpful? 0
  • +
  • -

#8 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 04:15 AM

Yes, There are some good articles on MSDN… But, they were written by robots that only robots can read.

I needed it dummied down just a little bit. :withstupid:

Thank you for responding Michael and helping me understand these topics.

I still don't quite think like a programmer yet. I'll get there.
Was This Post Helpful? 0
  • +
  • -

#9 Michael26   User is offline

  • Futurama: Insert funny joke here
  • member icon

Reputation: 414
  • View blog
  • Posts: 1,664
  • Joined: 08-April 09

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 05:03 AM

If you don't like articles on MSDN read a book, nobody became good programmer with just sitting around.

"think like a programmer" is the name of the book :)
http://shop.oreilly....781593274245.do

Quote

"I needed it dummied down just a little bit."

Just be careful not to become too dumb :)
Was This Post Helpful? 0
  • +
  • -

#10 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 05:26 AM

I'm reading an e-book from Brainmeasures. :smartass:
Just under 400 pages. :(!):

Is it a good thing to take a certification test from an ISO certified company? :^:
Was This Post Helpful? 0
  • +
  • -

#11 Michael26   User is offline

  • Futurama: Insert funny joke here
  • member icon

Reputation: 414
  • View blog
  • Posts: 1,664
  • Joined: 08-April 09

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 05:43 AM

I don't know about that
Was This Post Helpful? 0
  • +
  • -

#12 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 05:49 AM

Is it a good thing to have a certificate from a french culinary school if you are at McDonalds which is certified by the health department?

You're a rookie. People don't expect your resume to look like a 10 year pro. ANd you're not going to get the jobs offered to you that a 10 year pro would.
Just get a job in the industry. Then learn what that employer and its competitors want by way of certifications, in order to claw your way to the middle of the ladder.

This post has been edited by tlhIn`toq: 24 April 2013 - 05:50 AM

Was This Post Helpful? 0
  • +
  • -

#13 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 05:52 AM

:genius:
Was This Post Helpful? 0
  • +
  • -

#14 Curtis Rutland   User is offline

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 5104
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 06:03 AM

Quote

Is it a good thing to take a certification test from an ISO certified company?


I agree with the others. Don't bother trying to get certified right now. Just study and work projects. Certifications are for people who are actually professionals at what they're doing, not for people who are just learning the subject material. Unless it's a really weak cert, then it's not worth getting in the first place.
Was This Post Helpful? 0
  • +
  • -

#15 WidmarkRob   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-July 12

Re: C# Abstraction, Encapsulation, Inheritance, Polymorphism

Posted 24 April 2013 - 06:15 AM

I have a book, I just want to read it and discuss some of the topics to help me better understand this whole programming thing at places like here.

There's no reason to be rude.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2