• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What do you think about Object Oriented programming?

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello buddies,
I've been learning java about 3 three months and I found java is a very powerful language, you can use this language to program whatever logic in your mind. To learn how to use a object, how to create a method, a class, an instance of a class, event hander, it is getting easier as long as you do more examples, but I start to doubt do i really know what i did, yup i know how to make my program works, but I found out most of my programs is not object oriented at all, my programs are more like structrue or top down program. I am not sure if any beginer experience the same feeling as I do. I think i need some good guidelines of how to start to write an object oriented program.

Thank you very much! I will greatly appreciate for your reply.
Mindy
An extra question:
1. how to call a method from another class?
it is like that: classname.methodname();
Thank you again!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellant topic. So good that we have a WHOLE forum to talk about this. It is called OO, Patterns, UML and Refactoring. The Patterns that they talk about there are OO patterns that can be re-used. I think that studying up on those would be a good first step in thinking more OO like.
The GoF book (Gang of Four)(Design Patterns by Gamma et al.) is the one that I am reading.
See this page at the BunkHouse for other good references. http://www.javaranch.com/bunkhouse/bunkhouse_Design.jsp
 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mindy, I think we all have the same problem.
It takes some time and-as I hear-not all so
called OOP programmers are good at OOP'ing.
Johannes wrote a lot about procedural languages
and the bad habbits you inherit from using them.
I think I'm having the same problems. The past
three years, I've only though procedurally
(FORTRAN77) .
But I think we'll all get there --> OOP.
Stuart.
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think to understand OOP you have to change the way you think. I did 2 years of C before getting a job in java. It took me 2 months (reading books and doing java at home) to do the 'paradigms switch'. The best way to make the switch is to read books about ooad. The Gof book might be a little too hard for a beginner. Maybe thinking in java by Bruce Eckel or some OOP introductory book would be best.
later
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mindy,
I also have the same "problem". I dont really think much about code reuseability partly because everything I have written so far is for my own sites. In fact I read a tutorial called "Dukes bookstore" before writing my "Magic Shop" and first thing I did was throw out the ShoppingCartItem and ShoppingCart classes and add everything straight into the session making it not directly reusable. I am just now starting to understand a little better. My rationalization is "Oh well if I want to use it again I will change it at that time". Top down procedural is just the way I am used to thinking
I think the recommendation to read about patterns will help.
One good thing about it is that I'm not concerned about sharing my code because they will have to copy, paste and edit to use it anyway which is fine with me
[This message has been edited by Randall Twede (edited March 24, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic