sorry for this obviously newbie question, but can some one explain to me in simple english the meaning of an object orientated programe is?
sorry for this obviously newbie question, but can some one explain to me in simple english the meaning of an object orientated programe is?
WhAtHA hell Is GoInG ON
cprogramming.com has tutorials on this I'm sure, and if it doesn't (dear god) then google for it. There's plenty of information online about this.
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry
A program that focuses on objects rather than procedures. It's to the effect of looking for the 'what' instead of the 'how'. Once you figure out the 'what', the 'how' falls into place because objects--in theory--know what to do.
You create objects which contain data, and then you call predefined functions with those objects.but can some one explain to me in simple english the meaning of an object orientated programe is?
http://www.cprogramming.com/tutorial/lesson12.htmlcprogramming.com has tutorials on this I'm sure
It refers you to the forums.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Sorry, I didn't realiseOriginally Posted by dwks
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry
Well here is why you write object orientedly.
1. Encapsulation - Make it so you can reuse your functions, reuse your classes, with different implementations, with little changes
2. Ease of maintenance - Object oriented code is generally easier to debug, easier to add on to and change
3. Simply more logical.
Now for the metaphor
Essentially, the procedural programmer is someone who builds a house.
The OO programmer is someone who creates the building blocks of a house. Classes and functions are your building blocks.
Logically you use materials and building blocks to make houses, you don't just build a house as a whole..
The OO programmer works on a lower level, creating the materials, and then finally putting them together to create something beautiful.
Sometimes I forget what I am doing when I enter a room, actually, quite often.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
I really don't understand how people can take the time to go grab a link instead of writing a simple explaination :\
Sometimes I forget what I am doing when I enter a room, actually, quite often.
> I really don't understand how people can take the time to go grab a link instead of writing a simple explaination :\
1. the simple explanation usually doesn't exist for such an open ended question.
2. It's a lot more than STFW type questions deserve.