Feedback on an idea

Discussion in 'Java' started by Jean Charbonneau, Jul 11, 2004.

  1. Hello,

    We are doing a project which focuses on making a graphical kind of
    phone-book.

    For that, we have as input data a text file. We need to convert that file
    from text to binary form, but more than that, we must provide an efficient
    data structure so that search through the file is fast.

    For that we are going to use a binary-tree and chained-lists. We must use
    those anyways, it's a prerequisite for our project.

    I guess we shouldn't use the Java implementations of chainedlists, and use
    our own implementation instead.

    What I am planning to do, is to create the binary file as follow :

    Fields of the file :
    hashcode << should I use the .hashCode() method, or do my own one ?
    datas-used-for-the-phonebook
    left-tree-index << used for fast browsing through a binary-tree
    right-tree-index << same as before
    chained-index << used for the chained-list

    What do you think of this ? Is my idea any good in the concept ? I have an
    idea on how to make the tree, but it's a bit hard I think without some kind
    of background about it, do you got any websites which could help for such
    project ?

    I post this question in a java newsgroup, since I need opinion from Java
    programmers, who know the mecanism of Java and who can tell me if something
    would be a hasle or if there is easiest ways of making such thing.

    Thank you in advance

    Jean
     
    Jean Charbonneau, Jul 11, 2004
    #1
    1. Advertising

  2. "Jean Charbonneau" <> wrote in
    news:40f15804$0$20339$:

    > Hello,
    >
    > We are doing a project which focuses on making a graphical kind of
    > phone-book.
    >
    > For that, we have as input data a text file. We need to convert that
    > file from text to binary form, but more than that, we must provide an
    > efficient data structure so that search through the file is fast.
    >
    > For that we are going to use a binary-tree and chained-lists. We must
    > use those anyways, it's a prerequisite for our project.
    >
    > I guess we shouldn't use the Java implementations of chainedlists, and
    > use our own implementation instead.


    Use the Java implementation to get things working. Speed things up later, if necessary.

    > What I am planning to do, is to create the binary file as follow :
    >
    > Fields of the file :
    > hashcode << should I use the .hashCode() method, or do my own one
    > ? datas-used-for-the-phonebook
    > left-tree-index << used for fast browsing through a binary-tree
    > right-tree-index << same as before
    > chained-index << used for the chained-list
    >
    > What do you think of this ? Is my idea any good in the concept ? I
    > have an idea on how to make the tree, but it's a bit hard I think
    > without some kind of background about it, do you got any websites
    > which could help for such project ?
    >
    > I post this question in a java newsgroup, since I need opinion from
    > Java programmers, who know the mecanism of Java and who can tell me if
    > something would be a hasle or if there is easiest ways of making such
    > thing.


    Before you commit to a file format you should specify what you have:

    Phone number, address, first and last name, etc.

    Then specify what you will need as operations:

    Given a phone number find the address and names for it.
    Given an address get the names and numbers of the neighbors, etc.



    --
    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.12
    GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP t+ !5 X- R- tv--- b++
    DI++ D+ G++ e++ h---- r+++ y+++
    ------END GEEK CODE BLOCK------
     
    Tris Orendorff, Jul 12, 2004
    #2
    1. Advertising

  3. Jean Charbonneau

    Liz Guest

    Sounds like homework ( must use binary-tree ...).
    I would use Qsort and keep sorted data in the file
    for fast look since insert/delete is likely to be
    used infrequently.


    "Tris Orendorff" <> wrote in message
    news:Xns9523D57E88A2ARepublicPicturesLtd@216.221.81.119...
    > "Jean Charbonneau" <> wrote in
    > news:40f15804$0$20339$:
    >
    > > Hello,
    > >
    > > We are doing a project which focuses on making a graphical kind of
    > > phone-book.
    > >
    > > For that, we have as input data a text file. We need to convert that
    > > file from text to binary form, but more than that, we must provide an
    > > efficient data structure so that search through the file is fast.
    > >
    > > For that we are going to use a binary-tree and chained-lists. We must
    > > use those anyways, it's a prerequisite for our project.
    > >
    > > I guess we shouldn't use the Java implementations of chainedlists, and
    > > use our own implementation instead.

    >
    > Use the Java implementation to get things working. Speed things up later,

    if necessary.
    >
    > > What I am planning to do, is to create the binary file as follow :
    > >
    > > Fields of the file :
    > > hashcode << should I use the .hashCode() method, or do my own one
    > > ? datas-used-for-the-phonebook
    > > left-tree-index << used for fast browsing through a binary-tree
    > > right-tree-index << same as before
    > > chained-index << used for the chained-list
    > >
    > > What do you think of this ? Is my idea any good in the concept ? I
    > > have an idea on how to make the tree, but it's a bit hard I think
    > > without some kind of background about it, do you got any websites
    > > which could help for such project ?
    > >
    > > I post this question in a java newsgroup, since I need opinion from
    > > Java programmers, who know the mecanism of Java and who can tell me if
    > > something would be a hasle or if there is easiest ways of making such
    > > thing.

    >
    > Before you commit to a file format you should specify what you have:
    >
    > Phone number, address, first and last name, etc.
    >
    > Then specify what you will need as operations:
    >
    > Given a phone number find the address and names for it.
    > Given an address get the names and numbers of the neighbors, etc.
    >
    >
    >
    > --
    > -----BEGIN GEEK CODE BLOCK-----
    > Version: 3.12
    > GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP

    t+ !5 X- R- tv--- b++
    > DI++ D+ G++ e++ h---- r+++ y+++
    > ------END GEEK CODE BLOCK------
    >
     
    Liz, Jul 12, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mohamed Hosam

    Feedback Form ASP & ASP.NET

    Mohamed Hosam, Feb 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,012
    Itai Raz
    Feb 18, 2004
  2. valentin tihomirov

    Feedback mux created for signal data

    valentin tihomirov, Aug 31, 2004, in forum: VHDL
    Replies:
    2
    Views:
    3,946
    Thomas Stanka
    Sep 1, 2004
  3. Replies:
    10
    Views:
    1,268
    Big K
    Feb 2, 2005
  4. Dr Mephesto

    App idea, Any idea on implementation?

    Dr Mephesto, Feb 4, 2008, in forum: Python
    Replies:
    3
    Views:
    745
    Dennis Lee Bieber
    Feb 5, 2008
  5. Replies:
    0
    Views:
    653
Loading...

Share This Page