Search:

Type: Posts; User: felixb

Search: Search took 0.23 seconds.

  1. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    Thank you!!!
  2. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    ok, but do you have an idea how can i link between the trees?
  3. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    but if i have 3 persons for example:
    id = 1, addr = z st
    id = 2, addr = h st
    id = 3, addr = a st

    the id's tree will be like: (if i sort it by the id...)
    2
    1 3
    ...
  4. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    my PERSON type have ID, fname, lname, address
    and I built one tree that have that type.
    you mean I should build 4 trees (1- ID, 2 - fname, 3 - lname, 4 - address) instead?
    how will i do the link...
  5. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    how to do it?
  6. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    yes, the "DATA" of the tree is PERSON type (that i create) that have the following information about each person: ID, fname, lname, address.
    the tree sorted by the ID
    but also i want to search by...
  7. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Re: Binary tree

    The structure should support small and very large number of records.
    The Tree already supports the search (quick and eddicient) records by key field, the ID Number of structure person).

    What I'm...
  8. Thread: Binary tree

    by felixb
    Replies
    14
    Views
    32

    [SOLVED] Binary tree

    Hello,

    I am writing a program that maintains basic information about people (each person have id num, first name, last name).
    I keep all the data using a binary tree, which DATA is PERSON type...
  9. Replies
    10
    Views
    135

    [SOLVED] Re: using OOP in java

    you are right, thnk's for your help.
  10. Replies
    10
    Views
    135

    [SOLVED] Re: using OOP in java

    by post 3 do you mean - SuperMarket_demo.java? if is - so it do execute...

    about the constructor, this is the empty constructor

    public void SuperMarket()
    {
    this.name = null;...
  11. Replies
    10
    Views
    135

    [SOLVED] Re: using OOP in java

    from the console window:
    "
    Enter supermarket details:
    Enter name:
    my
    How many products do you have:
    2
    Exception in thread "main" java.lang.NullPointerException
    at...
  12. Replies
    10
    Views
    135

    [SOLVED] Re: using OOP in java

    ok, this is the full source's

    ProductType.class



    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.FileReader;
    import java.io.IOException;
  13. Replies
    10
    Views
    135

    [SOLVED] Re: using OOP in java

    why not? the function is in class Supermarket that have an empty constructor:
    public void SuperMarket()
    {
    this.name = null;
    this.products = new ArrayList<ProductType>();...
  14. Replies
    10
    Views
    135

    [SOLVED] using OOP in java

    Hi,

    I have 2 classes:
    1) productType that have name and price of the productType and an empty consturcor.
    2) superMarket that have name of supermarket and arraylist of productTypes (
    private...
  15. Replies
    3
    Views
    384

    Re: Creating folders in Eclipse

    thnks!
  16. Replies
    3
    Views
    384

    Creating folders in Eclipse

    Hello,

    I have some java projects in eclipse.
    I want to organize the projects into some folders in the Package Explorer.
    How can I do it? (I tried to add new folder, but it ask me to choose one...
  17. Replies
    2
    Views
    190

    Re: Question about math.pow

    sorry, my mistake. it's print exactly 4.
    thnks
  18. Replies
    2
    Views
    190

    Question about math.pow

    hi

    i run the following code:


    Math.pow(2,2)


    why the output is 4.012 and not 4?
  19. Re: getting input from the user and give him some chances

    ok, i moved it to the catch section.
    now it sees to be good.
    thnk you
  20. Re: getting input from the user and give him some chances

    it run, but incorrect.
    if i give 5 incorrect input - it run good, give 5 tries and exiting program after the 5 th attemp.
    if i give 4 incorrect and the last is correct - it give 4 tries, i the 5 th...
  21. getting input from the user and give him some chances

    Hi,

    I try to write piece of code that get input from the user and in case of wrong input give the user anoter chance (total of 3 tries) to type input again.
    what is the problem with it?

    this...
  22. Thread: Printing i+1

    by felixb
    Replies
    3
    Views
    150

    Re: Printing i+1

    Thanks
  23. Thread: Printing i+1

    by felixb
    Replies
    3
    Views
    150

    Printing i+1

    Hello,

    I have this part of source code



    for(int i=0;i<num;i++)
    {
    System.out.println("Recored number: " + i+1 + " is:");
    ....
  24. Replies
    1
    Views
    189

    Get input from the user till he type quit

    Hi,

    I'm trying to write little program that get input from the user (using BufferedReader and readLine() function) the program should run till the user type 'quit'.

    so i write something like...
Results 1 to 24 of 24