Create Java Book objects using the following data and place them in a List. (Fields: Author, Title, Year, Price) Java Programming,Deitel,2016,68.75 Python Programming,Gaddis,2018,78.56 Data Analytics,Norman,2017,89.56 Block Chain Development,Wilson,2019,87.45 Web Development,Brown,2018,98.98 Create TWO List Comparators to sort the Book objects in ascending order: One by Book Title and the second by Book Year. Using each Comparator, SORT the List once by Title and again by Year. NOTE: You MUST use the Comparator to SORT. Cannot use any other built in sort methods. Output each SORTED List on Console in a format same as the data shown above (One Book per line, comma separated).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Create Java Book objects using the following data and place them in a List.

(Fields: Author, Title, Year, Price)

Java Programming,Deitel,2016,68.75
Python Programming,Gaddis,2018,78.56
Data Analytics,Norman,2017,89.56
Block Chain Development,Wilson,2019,87.45
Web Development,Brown,2018,98.98

Create TWO List Comparators to sort the Book objects in ascending order: One by Book Title and the second by Book Year.

Using each Comparator, SORT the List once by Title and again by Year.

NOTE: You MUST use the Comparator to SORT. Cannot use any other built in sort methods.

Output each SORTED List on Console in a format same as the data shown above (One Book per line, comma separated).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning