A Conversation for Object-orientated Programming (OOP)

The thing about OOP!

Post 1

Is mise Duncan

The real problem I have with OOP is that no-one can give you a decent text-book example of how to use it.
The "Visual Basic" help file goes on about CTyranosaur classes inheriting from CDinosaur base classes, the MSDN site has some garbage about CTerrier implementing IDog...it's all madness.

Do you know of any "hello world" example of OOP? It would
be appreciated!


The thing about OOP!

Post 2

Grendel

Well I learned the hard way - looking at some code and figuring out what the hell it meant! Like I said in the entry, the best way to learn it is to do it. I found "Teach Yourself Java 1.2 in 21 days" a great book, the 1st OOP book I read and it really help. It's published by SAMS, the ISBN is 1-57521-390-7 (no, I don't work for them!).

Of all OOP languages, I'd have to say Delphi is the best platform to learn and develop on, because Pascal (the language it's based on) has always been quite object-oriented anyway. Give Delphi 5 a try.


The thing about OOP!

Post 3

Is mise Duncan

..unfortunately it's VB5 at the moment, because "he who pays the piper, calls the tune". I think this may be the root of the problem.

I have the Sams Java book - just no PC at home to use. I'll give it a try in my lunch hour though smiley - smiley


The thing about OOP!

Post 4

Grendel

There we go.. read the entry again, I've updated it and given it a sort of non-language specific intro to OOP. Have a read and tell me what you think. I think we've got the making of a good Guide entry here.


The thing about OOP!

Post 5

Is mise Duncan

Now I'm starting to get it. The main difficulty was that I was calling it "Interface-based Programming" rather than OOP.
(My Visual Basic backround, I'm afraid)

Ted Pattison's book, "Programming Distributed Applications with Visual Basic" has a fairly good explanation of this and how it the various methods of inheritance differ...I may paraphrase some of it for inclusion after the bank holiday.


The thing about OOP!

Post 6

The Researcher formerly known as 127355

Would it be something like:

class HelloWorld
{
public static void main(String args[])
{
ShowMessage showMsg = new ShowMessage();
}
}
class ShowMessage
{
public ShowMessage()
{
System.out.println("Hello World");
}
}

? (in java)


Key: Complain about this post

More Conversations for Object-orientated Programming (OOP)

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more