Anasayfa
/
Teknoloji
/
TopHat Question Which Color-code I Segment of This Program Is Incorrect? A. Public Interface Colorable [ Public Color GetColor('it B.

Soru

TopHat Question Which color-code I segment of this program is incorrect? A. public interface Colorable [ public Color getColor('it B. return Color.PINK; C. public class Rectangle implements colorable i constructor elided D. ooverride public Color getColor() E. return Color.RFD; Join Code: 316

Çözüm

4.5 (150 Oylar)
Nurettin
Uzman doğrulaması
Gelişmiş · 1 yıl öğretmeni

Cevap

The incorrect color-code I segment of this program is:C. public class Rectangle implements Colorable {constructor elided}The correct implementation should be:public class Rectangle implements Colorable { private Color color; public Rectangle() { this.color = Color.PINK; } @Override public Color getColor() { return this.color; }}