Java canot find symbol class

i have create 2 class

this is the first class

public class Book{

private String BookTitle;

private String BookAuthor;

private int yearPublished;

public Book(String Title, String Author, int yr){

BookTitle = Title;

BookAuthor = Author;

yearPublished = yr;

}

public String getTitle(){

return BookTitle;

}

public String getAuthor(){

return BookAuthor;

}

public int getyr(){

return yearPublished;

}

public void setTitle(String Title){

this.BookTitle = Title;

}

public void setAuthor(String Author){

this.BookAuthor = Author;

}

public void setyr(int yr){

this.yearPublished = yr;

}

public void printDetails(){

System.out.println("Title:\t" + BookTitle);

System.out.println("Author:\t" + BookAuthor);

System.out.println("YearPublished:\t" + yearPublished);

}

}

and second class

public class Catalogue {

private Book[] bookarray;

private int i = 0,count;

public Catalogue(){

bookarray = new Book[10];

bookarray[0] = new Book("Title: Absolute Java(Second Edition)\nAuthor: Walter Salvitch\nYear: 2006");

bookarray[1] = new Book("Title: Computer(Tools for an information age)\nAuthor: H.L Capron and J.A Johnson\nYear: 2004");

bookarray[2] = new Book("Title: Jursssic Park\nAuthor: Michael Crichton\nYear: 1991");

count = getBookSize();

}

public int getBookSize(){

while (bookarray != null){

i++;

}

return i;

}

public Book[] getBook(){

return bookarray;

}

public void addBook(String Title, String Author, int yr){

for(int j = 0; j <= getBookSize()-1; j++){

bookarray[getBookSize()] = new Book(Title, Author,yr);

}

}

//public int printCatalogue(){

//return printDetails;

//}

}

when i compile second class it give error " can not find symbol constructor Book(java.lang.String)

[2067 byte] By [anh000a] at [2007-10-3 7:50:15]
# 1

> when i compile second class it give error " can not find symbol constructor Book(java.lang.String)

It is just like the error says. Your code tries to create a new Book using a single String as the constructor argument, but you did not define a constructor in the Book class that uses a single String argument. The only constructor in Book takes 2 Strings and an int.

The following is exactly one String because there is exactly one pair of ". "Title: Absolute Java(Second Edition)\nAuthor: Walter Salvitch\nYear: 2006"

For future reference, please use the code tags when posting code. Just highlight the code and click on the code button.

atmguya at 2007-7-15 2:52:06 > top of Java-index,Developer Tools,Java Compiler...