Question: a Build a Book class that maintains information on a book. (Note: something like this might form part of a larger program such as a

 a Build a Book class that maintains information on a book.

a Build a Book class that maintains information on a book. (Note: something like this might form part of a larger program such as a library system). Include information that you would find in most books: author, title, pages, and reference number (String). Write setters and getters for these fields. In setter for reference number, setRefNumber (), only set the refNumber if the parameter is a String of at least 3 characters. If it is less than three, then make the String value an empty String: "" Include a field that tracks how many times the book was borrowed. A method should change the field by one each time. Add a boolean variable courseText that indicates whether or not a book is being used as a text book. Include a getter and a setter method. Include a toString() method that prints the details of the book. If the book does not have a proper refNumber then print"Zzz" instead. . Lastly, create a UML diagram for this class. Use Microsoft Word

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!