Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The replace method compares the total number of weeks that the musician has been on the top40 list. If the musician with the lowest number
The replace method compares the total number of weeks that the musician has been on the top40 list. If the musician with the lowest number of weeks on the top40 is lower than the number of weeks on the top40 of the new musician, then the old musician is replaced by the new one. If the musician is replaced, there should be a message to the user using this format: The musician Pink Floyd has been replaced by Tracy the Turtle. Otherwise, the user should be notified that the new musician cannot be added because they don't have enough weeks on the top40. For example: Sorry, Alex Eacker has less weeks in the Top 40 than the other musicians. This method should be created in the Billboard class. Use the BillboardTester class to test if the new musicians being added are being correctly replaced, or omitted from the Top 10
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