import java.awt.*; public class DrawingAdvancedCruiser extends DrawingCruiser{ EntityAdvancedCruiser EntityCruiser; public DrawingAdvancedCruiser(int speed, double weight, Color bodyColor, Color additionalColor, boolean helicopterPad, boolean coating, boolean ornamentWheels, int width, int height) { super(speed, weight, bodyColor, width, height, 110, 60); { EntityCruiser = new EntityAdvancedCruiser(speed, weight, bodyColor, additionalColor, helicopterPad, coating); } } public DrawingAdvancedCruiser(EntityAdvancedCruiser entityDumpTruck,IDop wheels) { super(entityDumpTruck, wheels); { EntityCruiser = entityDumpTruck; this.wheels = wheels; } } public EntityAdvancedCruiser getEntityCruiser(){ return EntityCruiser; } public void DrawTransport(Graphics g) { if (!(EntityCruiser instanceof EntityAdvancedCruiser)) { return; } super.DrawTransport(g); EntityAdvancedCruiser advancedCruiser = (EntityAdvancedCruiser) EntityCruiser; if (advancedCruiser == null ) { return; } Color addBrush = advancedCruiser.AdditionalColor; Color brush = advancedCruiser.BodyColor; if (advancedCruiser.HelicopterPad) { g.setColor(addBrush); g.drawRect(_startPosX + 35, _startPosY + 23, 15, 15); g.drawRect(_startPosX + 50, _startPosY + 19, 30, 25); } if (advancedCruiser.Coating) { g.drawOval(_startPosX + 70, _startPosY + 29, 20, 20); } if (wheels == null){return;} wheels.drawWheels(g, _startPosX, _startPosY, brush); } }