A book is good only if following conditions are met:
Number of pages must be between 100 to 500 (both inclusive)
The average number of pages per chapter should be 20. Average number can be deduced by dividing the number of pages by chapters.
Must have only one writer and name of writer must start with "Dr."
Name of that book should be between 8 to 15 characters not couning the space and hyphen('-') characters.
It should have a cover page. If it does not have one, then the language must be "Hindi".
Write a method:
boolean isGoodBook(int pages, String[] pageStatus, String bookName, String[] writerName, boolean hasCover, String language);
pages number of pages in the book.
chapters List of chapters of the book
bookName Complete name of the book
writerName name of the writer
hasCover true if it contains a cover page
language Language in which the book is written