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

1) If Shape is a class and you create a new class Rectangle that extends Shape,

ID: 3638158 • Letter: 1

Question


1) If Shape is a class and you create a new class Rectangle that extends Shape, then Shape is a(n) ____ and Rectangle is a(n) ____.
Which word goes in the first blank in the sentence above?


a subclass

b superclass

c inherited class

d package

2)Which of the following methods is NOT part of the class JFrame?


a setVisible

b setSize

c setTitle

d getText

3)Suppose str is a String variable. The statement

str = new String("Programming");

is similar to which of the following?


a new String = "Programming";

b String new = "Programming";

c str = "Programming";

d str new "Programming";

Explanation / Answer

1) superclass 2) getText 3) str = "Programming";