subject

A Musician class has been built that takes the name, number of albums sold, and number of weeks that artist has been on the Top40 list. The Musician class also has a boolean instance variable isPlatinum that determines if the musician has gone platinum, meaning they’ve sold over a million copies of the same record. The Billboard class currently has a top10 ArrayList that will store the top 10 musicians as a list. In the Billboard class, create an add method that will add a musician to the list if there are less than 10 musicians in the list, and if the musician has Platinum status. If there are 10 musicians in the list, then the method should call the replace method. Otherwise, a message should be displayed to the user that the musician could not be added to the top10 list. 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. There should be a message to the user that the old musician has been replaced by the new one. Otherwise, the user should be notified that the new musician cannot be added because they don’t have enough weeks on the top40. 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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:50
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a,b,c,d sharing the medium. (a) stations a,b,c,d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful.when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Acloud service provider uses the internet to deliver a computing environment for developing, running, and managing software applications. which cloud service model does the provider offer? a. iaas b. caas c. maas d. paas e. saas
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
You know the right answer?
A Musician class has been built that takes the name, number of albums sold, and number of weeks that...
Questions
question
Mathematics, 11.11.2020 01:00
question
History, 11.11.2020 01:00
question
History, 11.11.2020 01:00
question
Mathematics, 11.11.2020 01:00
question
Mathematics, 11.11.2020 01:00
question
Mathematics, 11.11.2020 01:00
Questions on the website: 13722363