what is object oriented????

Reply

Join Date: Jul 2006
Posts: 3
Reputation: hadi_82 is an unknown quantity at this point 
Solved Threads: 0
hadi_82 hadi_82 is offline Offline
Newbie Poster

what is object oriented????

 
0
  #1
Jul 3rd, 2006
i have one question...what is actually meant by object oriented...how do u know whether the programming is an object oriented or not...like people always say that C++ is an object oriented and VB is not really an object oriented..can somebody explain this..here
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,541
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: what is object oriented????

 
0
  #2
Jul 3rd, 2006
>what is actually meant by object oriented
Put simply, the problem is solved by thinking with objects. Then you ask what an object is and we say that it's a self-contained unit of data and code that operates on that data such that a single problem can be addressed using the object. As an example, rather than creating a socket variable and calling functions with it, you create a socket object and call methods provided by the socket class.

>people always say that C++ is an object oriented and VB is not really an object oriented
C++ is multi-paradigm. It directly supports the features necessary for several different methodologies, including object-oriented. VB is probably more object-oriented that you would expect because of the form editor, and VB.NET is leaning heavily in the direction of OO.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 3
Reputation: hadi_82 is an unknown quantity at this point 
Solved Threads: 0
hadi_82 hadi_82 is offline Offline
Newbie Poster

Re: what is object oriented????

 
0
  #3
Jul 3rd, 2006
i don't really understand by what u mean...can some one make it clearer..
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: what is object oriented????

 
0
  #4
Jul 3rd, 2006
Hmm big subject, there are whole books written purely to address this one question. Find one on Amazon or InformIT.com and read it, it will be worth every penny if your interested/studying or working computer programming.

Of the ones I've read these were some of the best :

Object Thinking, by David West Publisher: Microsoft Press Pub Date: February 11, 2004 ISBN: 0-7356-1965-4,

Sams Teach Yourself C++ in 24 Hours, Third Edition by Jesse Liberty Publisher: Sams Pub Date: August 24, 2001 ISBN: 0-672-32224-2

Pragmatic Programmer, The: From Journeyman to Master by Andrew Hunt, David Thomas Publisher: Addison Wesley Professional Pub Date: October 20, 1999 ISBN: 0-201-61622-X

Most languages since the late 90's support OO concepts to various degrees of depth and with various degrees of success. There is hot debate over what TRUE OO Programming is. To describe OO is beyond the scope of a topic in a forum, and to appreciate what the OO fuss is all about you need to know a bit about the history of computers and the programming of them.

At its most basic it is a method to design and implement computer software, that makes parts of it re-usable in many different software solutions, to make software easier to maintain and extend in the future.

Consider this logging errors in your program. There are many ways to do that and a psuedo program might be
string theError = "An error ocured";
File = OpenFile("c:\somefile");
writefile(file, theError);

Now everytime you start a new programming project if you want to implement some form of logging, you have to write similar statements again and again and again....zzzzzzzzzzzzz

so instead, you hide all this implementation in a class called ...I don't know ErrorLog
class ErrorLog
{
private:
        File m_Logfile;

public:
        static void LogError(string theError){writefile(m_LogFile, theError)};
};
I compile this as a self contained library (a type of program) and whenever I need logging in a futur programming solution I just remember to include a reference to my class library with my ErrorLog class in it and use it for logging. And to log an error I just call :
ErrorLog.LogError("my error");
I don't care how ErrorLog does it, the public function in the errorlog class tells me "Give me a string and I'll log it as an error"
In the futire I might extend the class and make it do funky things like send errors as emails to administrative staff or a database. It's all hidden within the class so all my previous programs still work as before, or I make a new class that "inherits" from ErrorLog so I get all the functionality of ErrorLog (without having to write all that agin) and just add the new stuff.

Anyway I digress, I could go on for hours.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,003
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 137
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: what is object oriented????

 
0
  #5
Jul 3rd, 2006
1. It is a way of thinking, especially organizationally. Different tasks are the responsibilities of different objects. For example, in C++, it's the responsibility of the vector to reallocate its own memory as needed, not some that of some procedure that uses the vector.

2. It's a way to create a dynamic typing system. This means I can have and use a Shape object and have it be an Ellipse, a Rectangle, or generalised Polygon without knowing what's underneath. Relative to C, this is C++'s biggest advantage.

3. It's a way of shortening code size and treating data consistently. Instead of needing to se different names, as in vector_get(v,i) and string_get(s,i) and map_get(m,i), you can write v.get(i) and s.get(i) and m.get(i). (Or, depending on the programming language and library, v[i], s[i], and m[i].)

It's not really about hiding implementation, since you can do that in any language with subroutines.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 3
Reputation: hadi_82 is an unknown quantity at this point 
Solved Threads: 0
hadi_82 hadi_82 is offline Offline
Newbie Poster

Re: what is object oriented????

 
0
  #6
Jul 3rd, 2006
when is a programming language is considered as object oriented language?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,003
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 137
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: what is object oriented????

 
0
  #7
Jul 3rd, 2006
That depends on who's doing the considering. Many languages have constructs that make it easy do object oriented programming, that wouldn't necessarily be considered object oriented languages.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: what is object oriented????

 
0
  #8
Jul 4th, 2006
Originally Posted by hadi_82
when is a programming language is considered as object oriented language?
When it supports Encapsulation (that's classes basically) AND inheritance (single or multiple) AND polymorphism (which relies on the previous two and is wide ranging in scope)

VB6 for example supports classes, it doesn't properly support inheritance though, and without the first two polymorphism is out. So VB6 is not 100% OO but there is some OO in there.

C++ is both an OO language AND not an OO language C++ supports all three pillars of OO, BUT it doesn't force you to use them you can still create structured programs in C++ without using any of it's OO capability.

JAVA is an OO language everything is an object, even the main starting point of the program is a class, you cannot (to the best of my knowlwedge) write a JAVA program without classes.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC