Closed Thread
Results 1 to 2 of 2

Thread: OOP concepts

  1. #1
    HayDee is offline Newbie
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    OOP concepts

    Hello!

    I've never used OOP beforse, so I can't understad how to design an object's class. Most tutorials are only explaining OOP syntax, but they don't explain deeper principles how to use OOP.

    For example, if I want to make a class which would list all files in some directory, should I make that class so that EVERY listed file is an instance of that class with it's own properties and methods, or should I make only one instance of that class with a constructor method, that calls listFiles method, sets curret directory propertie, etc... ?

    Hope you can share some links or book names where OOP would be explained deeper.
    Thanks.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,466
    Blog Entries
    74
    Rep Power
    143

    Re: OOP concepts

    Unfortunately, explaining OOP is a little like explaining how to use an if statement correctly. You kind of play with examples of OOP programs for a while, and you look at other designs, or you might pick up a book of about 250 pages that will go way in depth, and one day you start getting those AHA moments.

    Looking at your example, for instance, it depends ENTIRELY on what you want done. You may have several objects, or just one that contains a list of strings, or...
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help in clearing some concepts of ANSI C
    By sharpshooter09 in forum C and C++
    Replies: 10
    Last Post: 07-09-2011, 08:50 PM
  2. Beginning C# Objects: From Concepts to Code ebook
    By maulua in forum C# Programming
    Replies: 3
    Last Post: 02-16-2010, 12:36 PM
  3. Concepts
    By suneel_g in forum General Programming
    Replies: 2
    Last Post: 12-29-2008, 12:40 PM
  4. Replies: 7
    Last Post: 11-14-2008, 10:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts