What are inheritance and polymorphism? (Specification and implementation)

--Originally published at diegotc2016

Inheritance is when a class, which is called the sub class, has the main elements of another class (super class) and has another one or more. For example:

Class: Person Class: PersonTwo
Name

Age

Height

Name

Age

Height

Weight

Polymorphism means the many uses or functionalities an object ar operator or a class can have. For example:

a=4

b=5

Then you want to print a+b your output will be 9

a=”4”

b=”5”

Then you want to print a+b your output will be “45”

I got this out of object oriented course at lynda.com

What are inheritance and polymorphism? (Specification and implementation)


What are inheritance and polymorphism? (Specification and implementation)

He-he, POO, he-he

--Originally published at Ce qui est chouette

Watched, the video lies. Learn, I have.

Inheritance sounds cool and quite useful, is-a and has-a relations were easy to grasp. Example: Coffee has caffeine [has-a], coffee is a beverage [is-a] (shoutout to codecademy’s course on Java, which I’ve finished).

That’s about all I have to say about that, here are some pics of a test program I wrote using inheritance -in classic OOP manner, he-he POO. David Bowie (Major Tom) is-a singer ;) gotcha.

He-he, POO, he-he
I know I’m a little late on the Bowie train.
He-he, POO, he-he
But I ain’t going off the rails #ozzy

The jokes are insane, as we lie aboard a crazy train.

-Lil’ about guy.


He-he, POO, he-he

He-he, POO, he-he

--Originally published at Ce qui est chouette

Watched, the video lies. Learn, I have.

Inheritance sounds cool and quite useful, is-a and has-a relations were easy to grasp. Example: Coffee has caffeine [has-a], coffee is a beverage [is-a] (shoutout to codecademy’s course on Java, which I’ve finished).

That’s about all I have to say about that, here are some pics of a test program I wrote using inheritance -in classic OOP manner, he-he POO. David Bowie (Major Tom) is-a singer ;) gotcha.

He-he, POO, he-he
I know I’m a little late on the Bowie train.
He-he, POO, he-he
But I ain’t going off the rails #ozzy

The jokes are insane, as we lie aboard a crazy train.

-Lil’ about guy.


He-he, POO, he-he