Question: Java Problem There is an orchestra that can have wind, string or musical instruments. percussion. Design the corresponding classes knowing that they all have a

Java Problem

There is an orchestra that can have wind, string or musical instruments.
percussion. Design the corresponding classes knowing that they all have a
common method which is touching, which will display the message “I am
blowing/scratching/hitting the instrument” depending on whether it is wind, string or
percussion, followed by the instrument name.
Create an Orchestra class containing a list (type class attribute
ArrayList) with one instrument of each type. The completed list will be passed to the
Orchestra constructor as parameter. This application will also have
of a method called tune (which must be static) that will receive as
parameter the instrument to tune and that will call the corresponding method
playing the instrument, so something like this will appear: Tuning...I'm
blowing/scratching/banging the instrument….
As instruments it will be necessary from the main program, create a
flute, a violin and a bass drum, necessary to create the list and be able to instantiate
an object of the Orchestra class.
Initially the static refine method will be called, passing it each of the
instruments and later, a message “WE STARTED THE
CONCERTAZO” and through the orchestra object, we will call a method
concert, make them play all the instruments.

Step by Step Solution

3.39 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is some example code code public abstract class Instru... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!