Question: Make a book class. Each book has - Title - Author - Number of pages - Number of words - Price Your book class should
Make a book class. Each book has
Title
Author
Number of pages
Number of words
Price
Your book class should also have these two methods:
Price per word
Authors initials
Your authors initials method should calculate the initials based on the Authors name. Stephen Kings initials are SK
Your book class should be easily printable repr
Your book class should be sortable based on title in alphabetical order. If there are ties sort instead by descending price per word.
Make a list of these books:
Books
It; Stephen King; ;; $
The Gunslinger; Stephen King; ;; $
A Tale of Two Cities; Charles Dickens; ; ; $
Going Postal; Terry Pratchett; ; ; $
Guards! Guards!; Terry Pratchett; ;; $
Sort the books and print them out
Find the book with the highest price per word
Find the book with the lowest price per word
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
