Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

A Bit About Objects, Class, Inheritance

Share this post!
 Vote this!

What is an Object?

Objects used in programming are a bit like objects in the real world.  Physical objects have two characteristics: the state they are in (i.e., their properties or attributes)  and the behaviors they can perform. 

Consider a CD player.  Its state may consist of things like:    

Title of CD currently loaded
Track number
Volume setting
Playing/Paused/Stopped

Likewise, its behaviors may include:

Load a CD
Skip forward
Skip backward
Change volume
Play/Pause/Stop

Pictorially this could be represented as follows:

More...

0 comments:

Post a Comment