Question
In JAVA, Develop a superclass Music and subclasses Classic and Pop. You should implement the Comparable interface of Classic and Pop. Each Classic object contains
In JAVA, Develop a superclass Music and subclasses Classic and Pop. You should implement the Comparable interface of Classic and Pop. Each Classic object contains a title and a composer. Each Pop object contains a title and a integer ranking.
For testing, an array of Pop objects will be generated and sorted in alphabetic order of their composers. You should print out the order, title, and composer of these objects before and after the sorting.
An array of Pop objects will be generated and sorted by their rankings. You should print out the order, title, and ranking of these objects before and after the sorting.
For testing Classic, please use these inputs:
- Piano Concerto No. 24 in C minor, K. 491 by Wolfgang Mozart
- Revolutionary Etude (Op. 10, No. 12) by Frederic Chopin
- Swan Lake by Pyotr Ilyich Tchaikovsky
- Symphony No. 9 in D minor, Op. 125 by Ludwig van Beethoven
For testing Pop, please use these inputs:
- Supernatural, rank 36
- Thriller, rank 2
- Doctor Zhivago, rank 8
- Frozen, rank 17
- Fearless, rank 4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started