#include<iostream>
#include<cstring>
using namespace std;
class musicians
{
protected:
char info[15][15];
public:
void string()
{
strcpy(info[0], "Veena");
strcpy(info[1], "Guitar");
strcpy(info[2], "Sitar");
strcpy(info[3], "Sarod");
strcpy(info[4], "Mandolin");
}
void wind()
{
strcpy(info[0], "Flute");
strcpy(info[1], "Clarinet");
strcpy(info[2], "Sexophone");
strcpy(info[3], "Nadhaswaram");
strcpy(info[4], "Picoolo");
}
void perc(void)
{
strcpy(info[0], "Tabla");
strcpy(info[1], "Mridangam");
strcpy(info[2], "Bangos");
strcpy(info[3], "Drums");
strcpy(info[4], "Tambour");
}
void show()
{
for(int i=0; i<5; i++)
{
cout << info[i] ;
cout << " " << endl;
}
}
};
class typIns : public musicians
{
public:
void get()
{
cout<<"A. String Instrument"<<endl;
cout<<"B. Wind Instrument"<<endl;
cout<<"C. Percussion Instrument"<<endl;
}
void show(int choice)
{
switch(choice)
{
case 1:
{
string();
musicians::show();
break;
}
case 2:
{
wind();
musicians::show();
break;
}
case 3:
{
perc();
musicians::show();
break;
}
}
}
};
int main()
{
char again;
int a;
typIns b;
do{
b.get();
cout << "\nEnter the type of Instrument(1, 2, or 3): " << endl;
cin >> a;
b.show(a);
cout << "\nWould you like to look the instruments(Y or N): ";
cin >> again;
}while(again =='y' || again =='Y');
return 0;
}