the addItem() is in the Library class, the user should add info first before adding it as a book object to the library class.
Type: Posts; User: jaydac12
the addItem() is in the Library class, the user should add info first before adding it as a book object to the library class.
yes it should do that. It should create a Book object and store it in an array and the retrieveItem() method be able to retrieve what is store on the arraylist.
it is in the Book class. where in the Book class extends my library class. yes it compiles with no errors.
newBook.addItem(Integer.parseInt(idTF.getText()), dateTF.getText(), descriptionTF.getText(), Integer.parseInt(copiesTF.getText()),
titleTF.getText(), newBook.getAuthor(),...
how should i do that?
the add method? you mean like this? "newBook.add(new Book(args))"???
those statements are for storing the necessary info fro the book object in the arraylist. (i think)
my code cant seem to add the necessary info to my arraylist that's why i cannot retrieve it by...
i have no errors may my logic is wrong...
what do you mean by "Make the calls to the Book class's methods before adding the Book class object to the arraylist"?
it is in my main class, i did not...
import java.util.*;
import javax.swing.*;
public class Library
{
int id;
String date;
String description;
int copies;
String title;
int bookCount;