Write a program that takes in a letterclass ID of a ship and display the equivalent string class description of the given ID. Use the table below.
Class ID Ship Class B or b BattleShip C or c Cruiser D or d Destroyer F or f Frigate
#include <iostream>
using namespace std;
int main()
{
int T;
char a, b, c, d, f;
cin >> T;
while (T--)
{
cin >> a;
if (a == 'b' || a == 'B')
cout << "BattleShip";
else if (a == 'c' || a == 'C')
cout << "Cruiser";
else if (a == 'd' || a == 'D')
cout << "Destroyer";
else if (a == 'f' || a == 'F')
cout << "Frigate";
}
}