Results 1 to 3 of 3
  1. #1
    dexik is offline Member
    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Lightbulb Making a hashtable available?

    1. SQL class receives input from user e.g. insert 123, 'Canada', 'Toronto' and sends it to Database class

    2. Database class creates an object Address using input data and inserts this object into a hashtable and then serializes the hashtable.

    The specs say Connect command in SQL class should make database (simulated by hashtable) available and Disconnect command makes it unavailable.

    How do you understand making available and unavailable? And when they say Connect command it means a method, right?

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: Making a hashtable available?

    For me, from my understanding, making the connection available will be allowing you to access the hashtable. Maybe this is some kind of flag in the program. And the connect command can be a method or can be a string command you send to your program.

    And I think here we will be just guessing, it is better to ask the instruction clearly to those who give you this assignment.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,957
    Rep Power
    19

    Default Re: Making a hashtable available?

    As wsaryada says, there's a bit of a lack of information here (as you seem to have seen).

    All I can says is, if you are not Connected then I expect any call to the SQL class (or by the SQL class to the Database?) should result in an exception to say it isn't connected.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Hashtable question. Getting info from a hashtable
    By sindrem in forum New To Java
    Replies: 4
    Last Post: 01-19-2012, 05:00 PM
  2. hashtable
    By kmm1977 in forum New To Java
    Replies: 4
    Last Post: 01-20-2011, 04:24 PM
  3. hashtable
    By vijayabaskar in forum Java Servlet
    Replies: 0
    Last Post: 04-06-2009, 08:20 AM
  4. hashtable
    By vijayabaskar in forum Advanced Java
    Replies: 2
    Last Post: 04-06-2009, 08:05 AM
  5. Hashtable example
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-15-2008, 08:43 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
  •