Exam 7: Inheritance

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Explain the modifiers public,protected and private.

(Essay)
4.8/5
(30)

The Object class contains the method:

(Multiple Choice)
4.7/5
(33)

A derived class is also called a

(Multiple Choice)
4.9/5
(39)

The keyword extends indicates polymorphism.

(True/False)
4.8/5
(41)

A derived class contains only public instance variables and public methods from the base class.

(True/False)
4.9/5
(47)

A base class is synonymous with a:

(Multiple Choice)
4.7/5
(30)

Explain how parent and child classes are related to base and derived classes.

(Essay)
4.9/5
(43)

A method or instance variable modified by protected:

(Multiple Choice)
4.7/5
(37)

What is an "is a" relationship? How does it apply to the world of objects?

(Essay)
4.8/5
(40)

The equals method for a class should have _________ as the type of its one parameter.

(Multiple Choice)
4.8/5
(48)

An instance variable (or method)that is private in a base class is accessible by name in the definition of a method in any other class.

(True/False)
4.9/5
(32)

Inheritance is the process by which a new class - known as a _________ - is created from another class,called the _____________.

(Multiple Choice)
4.8/5
(32)

What is package access?

(Essay)
4.9/5
(41)

Create a test driver to test the functionality of your Rectangle class created in number 14 above.

(Essay)
4.9/5
(44)

What does the instanceof operator do?

(Essay)
4.8/5
(43)

Create a class to represent a Rectangle.Your class should contain instance variables for length and width,as well as member method to calculate the area and perimeter.

(Essay)
4.7/5
(36)

The special syntax for invoking a constructor of the base class is:

(Multiple Choice)
4.8/5
(38)

When you define a derived class,you give only the added instance variables and the added methods as well as all the methods from the base class.

(True/False)
4.8/5
(48)

Define a base class to represent a Clock.Your class should have instance variables for hours,minutes and seconds.

(Essay)
4.9/5
(26)

Explain what a call to super()does in a constructor of a derived class.

(Essay)
4.7/5
(36)
Showing 21 - 40 of 43
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)