There is a base abstract class Tank - it has some parameters and a constructor. A LightTank descendant class is created with the new armor parameter, all parameters are specified in the constructor. How to make a factory of tanks, so that depending on the incoming word LIGHT, MEDIUM, HEAVY, LightTank, MediumTank, HeavyTank objects are created that differ only in parameter values?
abstract public class Tank {...} public class LightTank extends Tank{ private int armor; public int getArmor() { return armor;} public Tank createTank(String model) { if (model.equals("LIGHT")) return new LightTank; else if....