Question: intro to java course(please make it as easy as possible) Any help greatly appreciated 1. Define a class named Book that contains: An int data

intro to java course(please make it as easy as possible) Any help greatly appreciated

intro to java course(please make it as easy as possible) Any help

1. Define a class named Book that contains: An int data field named pages that stores the number of pages in the book. A String data field named title that represents the title of the book. A constructor that accepts and creates a book object with the specified pages and book title . The getter and setter methods for all data field. A toString method that returns book information including the book title and pages The equals method that returns true if two books have same title and same number of pages. .The compareTo method that compares two books and returns -1 if the first book has less pages than the second one, +1 if the first book has more pages second one and 0 if both books have same number of pag 2. Write an application TestBoks that asks the user for a number of books read dng summer The application repeatedly creates that many book objects and prints to the screen information about the sm aller" book, ie. the book with the smaller number of pages, as well as the average number of pages per book read

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!