Inheritence

Descrição

More focused quiz over inheritance limited to 10 questionsv
Marvin Williams
Quiz por Marvin Williams, atualizado more than 1 year ago
Marvin Williams
Criado por Marvin Williams aproximadamente 6 anos atrás
25
0

Resumo de Recurso

Questão 1

Questão
The dependency relationship is sometimes referred to as the ____ relationship.
Responda
  • is-a
  • has-a
  • depends-on
  • knows-about

Questão 2

Questão
Consider the following inheritance hierarchy diagram:
Responda
  • Auto is a superclass of LandVehicle, and LandVehicle is a superclass of Vehicle.
  • Auto is a superclass of LandVehicle, and LandVehicle is a subclass of Vehicle.
  • Auto is a subclass of LandVehicle, and LandVehicle is a superclass of Vehicle.
  • Auto is a subclass of LandVehicle, and LandVehicle is a subclass of Vehicle.

Questão 3

Questão
Which of the following statements are true?
Responda
  • "class A extends B" means B is a subclass of A.
  • "class A extends B" means A is a subclass of B.
  • A subclass is usually extended to contain more functions and more detailed information than its superclass.
  • A subclass is a subset of a superclass.

Questão 4

Questão
Match the following Correct Response [blank_start]__3__[blank_end] makes the software available for use Correct Response [blank_start]__1__[blank_end] ensures that the code meets the requirements specification and weeds out bugs. Correct Response [blank_start]__4__[blank_end] seeks to analyze the data flow and to identify the system’s input and output. Correct Response [blank_start]__5__[blank_end] involves translating the system design into programs. Correct Response [blank_start]__2__[blank_end] is concerned with updating and improving the product. 1. Testing 2. Maintenance 3. Deployment 4. Analysis 5. Implementation
Responda
  • 3
  • 1
  • 3
  • 1
  • 4
  • 3
  • 2
  • 1
  • 5
  • 2
  • 4
  • 5
  • 2
  • 5
  • 4
  • 5
  • 3
  • 2
  • 1
  • 4
  • 2
  • 1
  • 4
  • 3
  • 5

Questão 5

Questão
What is a class called that represents the most general entity in an inheritance hierarchy?
Responda
  • Default class.
  • Superclass.
  • Subclass.
  • Inheritance class.

Questão 6

Questão
Every dolphin has a fin. Every dolphin is an animal. What kind of relationship would best describe the first and second statements?
Responda
  • Dependency : Inheritance
  • Coupling : Dependency
  • Inheritance : Aggregation
  • Aggregation : Inheritance

Questão 7

Questão
You are creating a class inheritance hierarchy about motor vehicles that will contain classes named Vehicle, Auto, and Motorcycle. Which of the following statements is correct?
Responda
  • Vehicle should be the default class, while Auto and Motorcycle should be the subclasses.
  • Vehicle should be the superclass, while Auto and Motorcycle should be the subclasses.
  • Vehicle should be the subclass, while Auto and Motorcycle should be the superclasses.
  • Vehicle should be the subclass, while Auto and Motorcycle should be the default classes.

Questão 8

Questão
Which class represents a more specific entity in an inheritance hierarchy?
Responda
  • Default class
  • Superclass
  • Subclass.
  • Inheritance class.

Questão 9

Questão
It is common for certain classes to keep track of how many times certain events have occurred over the life of an object. This is done using
Responda
  • A private instance variable within the class.
  • A local variable within a mutator method.
  • A notification event to a helper class.
  • An array of objects.

Questão 10

Questão
When invoking a method with an object argument, ___________ is passed.
Responda
  • the contents of the object
  • a copy of the object
  • the reference of the object
  • the object is copied, then the reference of the copied object

Semelhante

DNA and Gene Expression
Melania Pugliese
UML arrows
Marvin Williams
1_DNA and Gene Expression
Melania Pugliese
ACENTUAÇÃO GRÁFICA
Viviana Veloso
Conceitos de Contabilidade
Alessandra S.
Principais Temas para estudar Geografia
Marina Faria
Direito das Obrigações
João Lunge
Uso da vírgula
Kekê Dantas
1ª Guerra Mundial
Daniel Lima
Art. 5° da CF-88 parte II
Rafael Ferreira da Silva