Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Object Oriented Programming...
Closed Thread
Old 04-30-2006, 02:51 AM   #1 (permalink)
 
Ultra Techie

Join Date: Sep 2005

Posts: 638

tommyboy123x is on a distinguished road

Send a message via AIM to tommyboy123x
Default Object Oriented Programming...

what is it? how is it any different from non-OOP?
__________________

Some real (as in actual) surveys that pay money!
tommyboy123x is offline  
Old 04-30-2006, 05:44 AM   #2 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

It allows you to manipulate objects as atomic entities.

For instance, you can instantiate an 'object' that represents maybe an object in 3d. This object can contain all of the data required to draw the object within itself, along with the functions that are used to manipulate it.

I can call my3dobject.Rotate(90) without knowing anything about the internal data structures that actually make up the object.

If there were a function that was designed for drawing objects to the screen, I could pass my object to that function to draw it to the screen, again without knowing anything about the internal workings of it.

Also, someone could go back in later and change the internal workings of the object completely without me having to rewrite any of my code that uses the object.

Compared to non-OOP, to do the same things, I would have to have knowledge of the data structures being used to do the certain functions, and I would have to do all of the housekeeping on the data myself. I would also have to pass the data explicitly to every function that used it. If the way in which the data was stored changed, I would have to rewrite my whole program.
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
Old 05-07-2006, 09:45 PM   #3 (permalink)
 
Ultra Techie

Join Date: Apr 2005

Posts: 950

M4A1 is on a distinguished road

Send a message via AIM to M4A1
Default

http://en.wikipedia.org/wiki/Object_...ed_programming

Wikipedia is your friend.
M4A1 is offline  
Old 05-07-2006, 11:09 PM   #4 (permalink)
willsko87's Avatar
 
Monster Techie

Join Date: Apr 2004

Location: Melbourne, Australia

Posts: 1,219

willsko87 is on a distinguished road

Default

Quote:
Originally posted by TheHeadFL
I can call my3dobject.Rotate(90) without knowing anything about the internal data structures that actually make up the object.

If there were a function that was designed for drawing objects to the screen, I could pass my object to that function to draw it to the screen, again without knowing anything about the internal workings of it.
Aka encapsulation or blackbox
__________________
http://www.aflonline.com.au



willsko87 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On