Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is Object and Why we use it

 
Shabbir Anjum
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is object and why we use it???
what is defferance between Object Oriented Programming Language(OOP) and Procedural Programming Language
 
Aaron Roberts
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This should be moved to the Beginner forums.

Aaron R>
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Aaron Roberts:
This should be moved to the Beginner forums.

Aaron R>



Agreed. Off we go...
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a huge topic and I'm sure you can google for more information than I can give here. The basic difference (IMO) between OOP and procedural programming (PP) is that PP separates data from actions (or functionality) on that data. OOP on the other hand keeps a tight connection between data and the actions that can be performed on that data.

There is much more to it, but that is what I consider the fundamental difference. I'm not exactly sure what your programming background is, so I'm a bit reluctant to go into more detail. I'm sure someone else here will pipe in soon enough. In the mean time, you should google for "object oriented programming" and "procedural programming".

-Layne
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi shabbir anjum

what is object
Everything can be an object that has a physical shape such as your computer, CPU, keyboard. And it includes something intengible

Why we use it
We want to know what the object does, and what specific function or features do the object contain. Then, we can clear how the object co-operate with another object together to become a larger system. Then using some model or program that can simulate and help us to do the same thing that the real one does, and also help us to do some analysis in order to find out some solution when the answer can not be solved.

HTH
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://en.wikipedia.org/wiki/Object-oriented_programming
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by siu chung man:
hi shabbir anjum

what is object
Everything can be an object that has a physical shape such as your computer, CPU, keyboard. And it includes something intengible

I think "intengible" should be "tangible"; in other words you can touch it. I would disagree with this definition, although it might be helpful to help you get started with the ideas of OOP. Often objects represent real-life entities that can be touched and manipulated, such as a car or a person. However, objects can be less tangible and represent more abstract concepts such as a graphics context in a windowed environent or an computer application.

These are just examples, but I hope it helps clarify what an object is in the context of OOP.

Layne
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would disagree with this definition
I am sorry that my english is not good enough and I want to clear about the meaning of this statement
I want to say that object can be tangible or intengible, everything can be an object.
Um.....it is my opinion. It is not the definition of object.
Layne
If you model some real world objects, we can consider the environment or the situation as an object. Then, all others object can be live in the environment, and some intengible objects which contain temperature, air including relative gas ingredient and molecules. All conditions affect the result of experiment that should be considered.
And it is my opinion as well, please do not too serious.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic