Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The program compiles fine, but you cannot create an instance of Square because t

ID: 3909168 • Letter: T

Question

The program compiles fine, but you cannot create an instance of Square because the constructor does not specify the length of the Square.

The program has a compile error because you attempted to invoke the GeometricObject class's constructor illegally.

The program compiles fine, but it has a runtime error because of invoking the Square class's constructor illegally.

The program compiles fine, but you cannot create an instance of Square because the constructor does not specify the length of the Square.

The program has a compile error because you attempted to invoke the GeometricObject class's constructor illegally.

The program compiles fine, but it has a runtime error because of invoking the Square class's constructor illegally.

Explanation / Answer

Answer:

The program has a compile error because you attempted to invoke the GeometricObject class's constructor illegally.

class Square extends GeometricObject {
double length;

Square(double length) {
GeometricObject(length);
}
}