Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

Step: 1

Here is some example code code public abstract class Instru... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

More Books

Students explore these related Programming questions