Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started