I have the following code in Catalogue.java:
public void addBook(String addTitle, String addAuthor, String addYear)
array = books.length;
books[array] = new Book(addTitle, addAuthor, addYear);
It complains on the last line when trying to add a new book to the array.
The constructors in Book.java are:
public void Book()
title = "";
author = "";
year = "";
public void Book(String aTitle, String aAuthor, String aYear)
title = aTitle;
author = aAuthor;
year = aYear;
Can someone tell me why this doesn't work?