Question: QUESTION 2: BoOK PROGRAM Design and write a java class that represents books. Use good Object Oriented Programming structure and style. Test your program by

 QUESTION 2: BoOK PROGRAM Design and write a java class thatrepresents books. Use good Object Oriented Programming structure and style. Test your

QUESTION 2: BoOK PROGRAM Design and write a java class that represents books. Use good Object Oriented Programming structure and style. Test your program by creating a separate class with a main program that creates, Your Book class must provide the following capabilities using good encapsulation techniques, 1. Books have a title (String), author (String), publication year (int), and total number of updates, and prints out some Book objects. good style, and good Object Oriented Programming pages (int). Books also have a current reading position (the page where you are in the book currently) 2. Books can be constructed in two ways A new book is created with title, author, publication year, and total number of a. pages (set the reading position to page 1) b. A new book is alternatively created with the all the information as above but also with a current reading position. Be sure the current reading position is not beyond the end of the book. (in both cases be sure the object is fully set up in a consistent way and ready to be used) 3. Provide a method called updatePage that allows users of the class to update the current reading position to a new page. Be sure the reading position does not go beyond the end of the book. Be sure you allow the reading position to go backwards (to show will reread from some point)

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!