Java Chapter 9

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

False, this is an example of a "has-a" relationship. Class "Car" has an "is-a" relationship with class "Vehicle"

A "Car" class has an "is-a" relationship with the "SteeringWheel" and "Brakes" classes

False, a "has-a" relationship is implemented via composition and a "is-a" relationship is implemented via inheritance

A "has-a" relationship is implemented via inheritance

public

A superclass's _____ members are accessible anywhere that the program has a reference to an object of that superclass or to an object of one of its subclasses

public and protected

A superclass's _____ members can be accessed in the superclass declaration "and in" subclass declaration

"has-a" or composition

In a(n) _____ relationship, a class object has references to objects of other classes as members

"is-a" or inheritance

In a(n) _____ relationship, an object of a subclass can also be treated as an object of its superclass

hierarchial

In single inheritance, a class exists in a(n) _____ relationship with its subclasses

super

Subclass constructors can call superclass constructors via the _____ keyword

true

Superclass constructors are not inherited by subclasses

False, this is known as overriding, not overloading - an overload method has the same name, but a different signature

When a subclass redefines a superclass method by using the same signature, the subclass is said to overload that superclass method

constructor

When an object of a subclass is instantiated, a superclass _____ is called implicitly or explicitly

Inheritance

_____ is a form of software re usability in which new classes acquire the members of existing classes and embellish those classes with new capabilities.


संबंधित स्टडी सेट्स

Microeconomics Chapter 6 Elasticity: The Responsiveness of Demand and Supply

View Set

Ch 8 Supply in a Competitive Market - Review

View Set

psychology unit 2 quiz QUESTIONS

View Set

Lippincott the child with health problems of the urinary system

View Set