*
The moose likes Beginning Java and the fly likes Characteristics of good OO/object oriented code ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Characteristics of good OO/object oriented code ? " Watch "Characteristics of good OO/object oriented code ? " New topic
Author

Characteristics of good OO/object oriented code ?

Andy Jack
Ranch Hand

Joined: Nov 22, 2012
Posts: 257
How can I tell if my OO code is good ? What are the characteristics of good OO code and how do we check if our code satisfies them ?


Java Newbie with 72% in OCJP/SCJP - Super Confused Jobless Programmer.
I am a "newbie" too. Please verify my answers before you accept them.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Do you know the characteristics of object‑oriented code?
  • 1: Encapsulation
  • 2: Data hiding
  • 3: Classes responsible for themselves
  • 4: Simple methods which do one thing each
  • 5: Multiple classes similar in size
  • 6: Correct use of inheritance, composition, etc.
  • 7: Cohesion versus coupling
  • 8: Conventions about naming, indentation etc.
  • 9: Correct use of static members
  • And there are bound to be lots more which I can’t think of in the time I have available.
    Andy Jack
    Ranch Hand

    Joined: Nov 22, 2012
    Posts: 257
    Campbell Ritchie wrote:Do you know the characteristics of object‑oriented code?
  • 1: Encapsulation
  • 2: Data hiding
  • 3: Classes responsible for themselves
  • 4: Simple methods which do one thing each
  • 5: Multiple classes similar in size
  • 6: Correct use of inheritance, composition, etc.
  • 7: Cohesion versus coupling
  • 8: Conventions about naming, indentation etc.
  • 9: Correct use of static members
  • And there are bound to be lots more which I can’t think of in the time I have available.


    Thanks...i appreciate the nice list you made for me. Is there a book which shows some of these concepts in use ?

    Tears of joy meme
    Campbell Ritchie
    Sheriff

    Joined: Oct 13, 2005
    Posts: 38075
        
      22
    Any decent book should show you all those features.
    And “you’re welcome”
    Andy Jack
    Ranch Hand

    Joined: Nov 22, 2012
    Posts: 257
    Campbell Ritchie wrote:Any decent book should show you all those features.
    And “you’re welcome”


    Can I get some more of those. I need all the technical words so that I can look them up.
    Marcos Vidolin
    Greenhorn

    Joined: May 10, 2011
    Posts: 28
    These books can help you to get the answers: Effective Java (Joshua Bloch) and Clean Code (Robert C. Martin).
    It's a great reading for all Java developers.

    []'s
    Paul Clapham
    Bartender

    Joined: Oct 14, 2005
    Posts: 18541
        
        8

    Andy Jack wrote:I need all the technical words so that I can look them up.


    Here you are again asking for a complete list of something which doesn't have a complete and universally agreed list.
    Andy Jack
    Ranch Hand

    Joined: Nov 22, 2012
    Posts: 257
    Paul Clapham wrote:
    Andy Jack wrote:I need all the technical words so that I can look them up.


    Here you are again asking for a complete list of something which doesn't have a complete and universally agreed list.


    I thought there might be such a list. But, we could have a list which combines lists by various schools of thought or various people. So, we can see what perspectives exist in the industry.
    Then, we can see which we agree with.

    Paul Clapham
    Bartender

    Joined: Oct 14, 2005
    Posts: 18541
        
        8

    Andy Jack wrote:But, we could have a list which combines lists by various schools of thought or various people. So, we can see what perspectives exist in the industry.


    Sure, you might be able to do that. It might be a good PhD thesis topic for somebody. But you can't expect somebody to produce that list on demand for a question on a forum. Please try to be realistic.
    Andy Jack
    Ranch Hand

    Joined: Nov 22, 2012
    Posts: 257
    Paul Clapham wrote:
    Andy Jack wrote:But, we could have a list which combines lists by various schools of thought or various people. So, we can see what perspectives exist in the industry.


    Sure, you might be able to do that. It might be a good PhD thesis topic for somebody. But you can't expect somebody to produce that list on demand for a question on a forum. Please try to be realistic.


    No, i did not expect it all at one go. Everyone can throw in a couple of bits and make a big post with lots of points.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Characteristics of good OO/object oriented code ?
     
    Similar Threads
    CheckStyle Rule : Making final to the local variables
    formatting
    Non -OO legacy code
    Infinitude
    CPAN for Java?