Results 1 to 7 of 7
  1. #1
    JT4NK3D's Avatar
    JT4NK3D is offline Member
    Join Date
    Nov 2007
    Posts
    50
    Rep Power
    0

    Exclamation [SOLVED] project layout

    I want to start a project (i'm using BlueJ IDE) but im not really sure how to organize it. Im going to have 1 driver class and then other classes with all the code and methods that the driver class will use, and among those maybe some interfaces, but I need some kind of structure to start with. Can someone please give me a typical layout to help me get started? If someone could post something like e.g.
    driver class
    _____________|_____________
    | | | |
    class1 class2 class 3 class4
    |_______| |_______|
    | |
    interface1 interface 2

    Not that, thats just the general idea but i really dont know very much about making projects with lots of different classes etc. this is probably a noobish question but i dont know how im gonna start it please someone answer.

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    Code organization is an important aspect in programming. If you have general idea on how your classes will be. Divide them according to their functionality. For example separate the part that is related to database, user interface and so on. Put them in separate packages.
    There is no hard and fast rule for the organization. Its all about making whole project easily comprehensible.
    dont worry newbie, we got you covered.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    All depends on your skills. Such organizing can't learn by a book, you have to make a right decision and go ahead.

  4. #4
    greyhat is offline Member
    Join Date
    May 2008
    Posts
    17
    Rep Power
    0

    Default

    it depends on your scenario and skills
    Rgds
    GreyHat:cool: and ya keep :D

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default It's a good practice

    Quote Originally Posted by JT4NK3D View Post
    Not that, thats just the general idea but i really dont know very much about making projects with lots of different classes etc. this is probably a noobish question but i dont know how im gonna start it please someone answer.
    One of the basis idea in OOP is collect much similar process into one place. Make a class and put them inside it. You can make any number of classes, (as well as any number of methods in a single class) to make clear your project.

    So always think about the common views of each other. Make all names(classes, methods, fields) in descriptive way, more depend on the class you work out.

  6. #6
    JT4NK3D's Avatar
    JT4NK3D is offline Member
    Join Date
    Nov 2007
    Posts
    50
    Rep Power
    0

    Default

    Thanks, I have a better idea of what to do now. So should i just make all the other classes that the driver class uses subclasses of the driver class?

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Border Layout
    By mark-mlt in forum Java Applets
    Replies: 5
    Last Post: 05-12-2008, 10:48 AM
  2. Help with JButton and layout
    By adlb1300 in forum AWT / Swing
    Replies: 1
    Last Post: 12-25-2007, 09:33 AM
  3. Layout Managers
    By gmioannou in forum AWT / Swing
    Replies: 1
    Last Post: 12-24-2007, 05:12 AM
  4. Help with Grid Layout
    By coco in forum AWT / Swing
    Replies: 1
    Last Post: 08-06-2007, 09:03 PM

Posting Permissions

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