Write a program that:
Accepts from the user at runtime multiple BOOKS.
Each BOOK has a TITLE, DATE OF PUBLICATION (including year, month, and day), AUTHOR, and LENGTH (in pages).
Input AUTHOR can be STEVEN KING, RUDYARD KIPLING, ISAAC ASIMOV or SUZANNE COLLINS.
NOTE: TITLE field will not contain punctuation of any kind (Examples: “I, Robot” will be entered as “I Robot”; “Sophie’s Choice” would be entered as “Sophies Choice”)
Input will be formatted as "TITLE,DATE,AUTHOR,LENGTH" with dates formatted as "mm/dd/yyyy" e.g. "02/14/1856" as shown in the examples below.
Each AUTHOR writes in a specific GENRE.
Steven King writes Horror
Rudyard Kipling writes Adventure
Isaac Asimov writes Science Fiction
Suzanne Collins writes YA Fiction
Identify the oldest BOOK by the AUTHOR with the most BOOKS.
Display to the user the following message about this BOOK:
"TITLE, written by GENRE writer AUTHOR on DATE OF PUBLICATION is LENGTH pages long."
EXAMPLES
Example 1:
Input:
Carrie,06/13/1982,Steven King,762
The Stand,01/01/1984,Steven King,1200
The Hunger Games,11/12/2013,Suzanne Collins,600
The Jungle Book,03/21/1898,Rudyard Kipling,483
Kim,02/03/1910,Rudyard Kipling,526
I Robot,08/11/1945,Isaac Asimov,474
Firestarter,04/01/1982,Steven King,597
Output:
Firestarter, written by Horror writer Steven King on 04/01/1982 is 597 pages long.
Example 2:
Input:
Carrie,06/13/1982,Steven King,762
I Robot,08/29/1945,Isaac Asimov,474
The Jungle Book,09/17/1900,Rudyard Kipling,483
Kim,02/03/1910,Rudyard Kipling,526
Mockingjay,08/09/2014,Suzanne Collins,642
Output:
The Jungle Book, written by Adventure writer Rudyard Kipling on 09/17/1900 is 483 pages long.
Submission Comments: