Question: Write a class Book characterized by the public attributes title a String that represents the title of the book. authors is a Linked List of
Write a class Book characterized by the public attributes title a String that represents the title of the book. authors is a Linked List of String object that stores all the authors names. price is a double that represents the cost of the book. The class Book has a constructor that initializes the list authors to an empty linked list, initializes title to Not Available and the price to 0. The class Book is comparable and defines a natural ordering based on the price attribute. The class Book has a to String () method that returns the following String representation: [title, authors, price].
language is java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
