• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Oriented Programming

 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

What do we actually mean by OOP?
and what are the other languages related to objects , such as object based language?

And what do we mean by fully object oriented?
Is java fully object oriented?

Please reply

Thanks in Advance
 
Max Rahder
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you do an Internet search on "object oriented programming" you'll find lots of good explanations. Here's one from Wikipedia:
http://en.wikipedia.org/wiki/Object_oriented_programming
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a *lot* of OO languages, some using object systems differently than Java (JavaScript/Self, for example, are prototype-based, CLOS is multimethods, etc.)
Is java fully object oriented?

This depends on who you ask. In my opinion, not really. The example I use is the Arrays utility class; in a "more complete" OO language these would be part of an array class. This is endlessly arguable--I generally don't get involved and let people decide on their own :)
 
Max Rahder
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another "un-OO" aspect of Java is that it has primitives. Because of that, you need to say "i == k" in some contexts, and "i.equals(k)" in others. Do I *like* Java? Yeah. Have I used more pure OO languages? Yeah.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all,
for Such nice and satisfying answers.


 
Embla Tingeling
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prash Singh wrote:
What do we actually mean by OOP?
and what are the other languages related to objects , such as object based language?

And what do we mean by fully object oriented?
Is java fully object oriented?


OOP means that the language supports a class concept, a unit of encapsulation which allows you to define your own types, and that variables declared using those types hold data in the form of objects. In addition to encapsulation an OO language should support inheritance and polymorphism. Inhertance is a way of composing new types from other types. Polymorphism comes in essentially four forms: coercion, overloading, subtype and generics.

Object based means that objects have the form of records used to store data. Examples are C and Pascal. It can also mean an OO programming style which reduces objects to records. Objects aren't asked to do things, they're merely used to hold data which is shuffled in and out.

Full OO usually means that "everything is an object". In that sense Java isn't full OO because it has primitives and static methods and the keywords aren't objects. And there is no definition of what full encapsulation, inheritance and polymorphism actually would mean so "full" is a moving target really.

In my view Java is enought OO for any practical purposes. Making it "fuller" wouldn't necessarily improve it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic