Question
Create a class called Musicians to contain three functions string ( ), wind ( ) and perc ( ). Each of these functions should initialize
Create a class called Musicians to contain three functions string ( ), wind ( ) and perc ( ).
Each of these functions should initialize a string array to contain the following instruments: - veena, guitar, sitar, sarod and mandolin under string ( ) - flute, clarinet saxophone, nadhaswaram and piccolo under wind ( ) - tabla, mridangam, bangos, drums and tambour under perc ( )
It should also display the contents of the arrays that are initialized.
Create a derived class called TypeIns to contain a function called get ( ) and show ( ). The get ( ) function must display a means as follows:
Type of instruments to be displayed a. String instruments b. ind instruments c. Percussion instruments
The show ( ) function should display the relevant detail according to our choice. The base class variables must be accessible only to its derived classes.
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