Question: Write an application TestBook that creates two Book objects with the following specifications: book1: pages -> user input book2: pages -> a random integer between

Write an application TestBook that creates two Book objects with the following specifications:

book1: pages -> user input

book2: pages -> a random integer between 200-300, inclusive

The application prints to the screen the average number of pages of the two books. It then creates a third book object with number of pages equal to the sum of the number of pages of the previous two books and prints to the screen the information about that third book, i.e. toString() method.

Show how to do this toString method for this

Java

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!