Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Feedback on an idea

Reply
Thread Tools

Feedback on an idea

 
 
Jean Charbonneau
Guest
Posts: n/a
 
      07-11-2004
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


 
Reply With Quote
 
 
 
 
Tris Orendorff
Guest
Posts: n/a
 
      07-12-2004
"Jean Charbonneau" <(E-Mail Removed)> wrote in
news:40f15804$0$20339$(E-Mail Removed):

> 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------

 
Reply With Quote
 
 
 
 
Liz
Guest
Posts: n/a
 
      07-12-2004
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" <(E-Mail Removed)> wrote in message
news:Xns9523D57E88A2ARepublicPicturesLtd@216.221.8 1.119...
> "Jean Charbonneau" <(E-Mail Removed)> wrote in
> news:40f15804$0$20339$(E-Mail Removed):
>
> > 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------
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feedback from feedback on MCP questions Matt Adamson Microsoft Certification 0 04-27-2009 11:13 AM
Re: App idea, Any idea on implementation? Matthew_WARREN@bnpparibas.com Python 0 02-05-2008 05:50 PM
App idea, Any idea on implementation? Dr Mephesto Python 3 02-05-2008 06:55 AM
eDimensional AudioFX Force Feedback Gaming Headset Review Silverstrand Front Page News 0 06-26-2005 05:15 PM
Nested conditional expressions ---- good idea/bad idea? nimmi_srivastav@yahoo.com C Programming 10 02-02-2005 10:51 PM



Advertisments