Question: Book Class: represents a book and can be online, digital, or hardcopy. Books have a title, author, number of pages, and a publication year (or

 Book Class: represents a book and can be online, digital, or

Book Class: represents a book and can be online, digital, or hardcopy. Books have a title, author, number of pages, and a publication year (or year of last revision if online). Required items (beyond the basics to set up a properly structured class): A constructor that takes input of title, author, publication year, number of pages, as two Strings and two ints A getPages method that returns the number of pages in the book at this time. A tostring() method that returns a String suitable for printing out the key information about the book. You decide the format but it should all be one line when the string is printed. Be sure to include the number of pages in the book in the returned string. An updateBook method that works with the existing book object to change its publication year and number of pages. Get the new values for publication year and pages as parameters

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!