Hi All,
I would like to know what is the error in the following program, when I compile it shows me syntax error I have done everything to rectify up to my knowledge but I couldn’t so pls help me.
public static Car construct(CarGroup carGroup)
{
Car car;
;
switch (carGroup)
{
case CarGroup::Economy :
car = new Car_Economy();
break;
case CarGroup::Compact :
car = new Car_Compact();
break;
case CarGroup::MidSize :
car = new Car_MidSize();
break;
case CarGroup::Luxury :
car = new Car_Luxury();
break;
}
return car;
}
Regards,
Naveen