Results 1 to 6 of 6
  1. #1
    Javid is offline Member
    Join Date
    Aug 2008
    Posts
    3
    Rep Power
    0

    Question Some questiong about Data Structures in Java

    1. A Heap is defined as a special kind of BinaryTree and a BinarySearchTree is a kind of BinaryTree, yet neither of these two containers is an extension of BinaryTree, Explain Why.

    2. For any Container to be useful, we must be able to add and remove objects, yet Container does not define any commands for adding and removing, Why?

    3. In terms of accessing all the elements in a container, how does an Iterator object offer an advantage over simple query methods that actually iterate through all objects in the container for you? When is it better to use a simple query as opposed to returning an Iterator?

    4. If Java provided the capability for generic types, how would the Container hierarchy be affected? Specially, how would interface Container change?

    ----------------------------
    these questions are excersices of book "Fundemantals of OOP & Data Structures in Java"

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Need some effort

    Javid: You need to try to answer these questions yourself. If there is a specific question/doubt/problem, then the forum will help you. The forum won't answer these type of questions until you show some effort and have specific questions.
    CJSL

  3. #3
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    heh. but java DOES enable generic types. your book is old.

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

    Default

    If you tale those question from a book, all the concepts should well explained there. Read it well and try to find the solution your self. Seems that you didn't put any attempt. If so, what are your answers, put them here so I can comment on that.

  5. #5
    Javid is offline Member
    Join Date
    Aug 2008
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by CJSLMAN View Post
    Javid: You need to try to answer these questions yourself. If there is a specific question/doubt/problem, then the forum will help you. The forum won't answer these type of questions until you show some effort and have specific questions.
    CJSL
    I know I have to answer these questions myself, but there were 12 questions, & these four are remaining! I don't know the answers for these and didn't find them in the book! I will be thankful if you guide me or give me a resource to find my answers in it! :)

  6. #6
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Try the web...

    If the book doesn't have the answers (which I find odd), google it. I did and found info on at least two of the questions. Hint: go look at the Java Container class methods.
    CJSL

Similar Threads

  1. Plot 2D graph in Java from RS-232 data
    By spratana in forum Java 2D
    Replies: 4
    Last Post: 02-11-2009, 06:49 PM
  2. Data Sorting in a .data file using java
    By stutiger99 in forum New To Java
    Replies: 2
    Last Post: 10-08-2008, 02:52 AM
  3. Sux data structures 1.0.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 04-15-2008, 06:54 PM
  4. Data Structures Help...
    By jac0117 in forum New To Java
    Replies: 1
    Last Post: 01-12-2008, 07:31 AM
  5. it's possible format data in java?
    By paul in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:10 AM

Posting Permissions

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