public class BonusFactory
{
public static Bonus createBonus(int type)
{
Bonus b = null;
switch(type)
{
case IEntity.BONUS_BOOSTER : b= new BonusBooster() ; break;
case IEntity.BONUS_LIGHTNING_ORB : b= new BonusLightningOrb() ; break;
case IEntity.BONUS_GRAVITY_ORB : b= new BonusMagneticOrb() ; break;