Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    Before creating an instance of a Book object, the code needs to read in all the data from the user that is needed to create the Book object. When all the data is available, call the Book class's...
  2. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    Where is the Book class?

    The action listener classes have the wrong names. The names look like the names for a button, not a listener.

    Also posted at...
  3. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    The Book class could have a method that would do the comparing needed to find matches with the String the user input. The method could return true if there was a match and false otherwise.

    You...
  4. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    That is correct.
    Can you explain the purpose of the comparison you want to make?
    What does the String contain?

    There are several ways You can use a String to find or select a Book.
  5. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    What is the purpose of comparing it to a String? What data does the String contain?

    Do you know how to define an array? Here's a sample:

    TheType[] varName = new TheType[<nbr of elements>];
  6. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    What data do you want to compare?
    The Book class could have a method that returns a String
    or it could have a method that tested its data against a given argument.
  7. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    It the array to be update is in the Library class, should the addBook() method be in the Library class?

    arrays do not have constructors. Use the new statement to define an array. See:
    Arrays...
  8. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    There are a lot of things to think about before trying to write the method:
    What class will the add() method be in?
    Where will the array be that it stores the data in?
    Will all the data be put...
  9. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    Your description of what the add() method should do does not make sense,
    A method can not be displayed. It can display data that is in the program.
    That description sounds more like what a Book...
  10. Replies
    26
    Views
    3,254

    Re: Help With My Library Program please.

    Can you describe what the add book method should do? What data will it take as its arguments and what will it do with that data?
Results 1 to 10 of 10