Chris Fraser
Quiz por , criado more than 1 year ago

Quiz sobre Computer Science Quiz: Writing Custom Classes, criado por Chris Fraser em 06-11-2014.

29
0
0
Sem etiquetas
Chris Fraser
Criado por Chris Fraser mais de 9 anos atrás
Fechar

Computer Science Quiz: Writing Custom Classes

Questão 1 de 10

1

An object has...?

Selecione uma das seguintes:

  • State and Behaviour.

  • Actions and Classes.

  • Methods and Code.

Explicação

Questão 2 de 10

1

How many objects can a class have?

Selecione uma das seguintes:

  • 234

  • 2

  • As many as we want

  • 100

Explicação

Questão 3 de 10

1

What type of declarations need to be made by a class?

Selecione uma das seguintes:

  • State and Behavior

  • Class and Object

  • Data and Method

Explicação

Questão 4 de 10

1

What is the toString method?

Selecione uma das seguintes:

  • A method that makes two strings.

  • A method that combines two strings.

  • A method that prints a string representation of an object.

  • A method that returns a string representation of an object.

Explicação

Questão 5 de 10

1

What is a constructor?

Selecione uma das seguintes:

  • A person who directs a choir or orchestra.

  • A person who builds buildings

  • A method used to set up an object upon its creation.

  • A method used to build a class.

Explicação

Questão 6 de 10

1

How is a constructor called and how is it named?

Selecione uma das seguintes:

  • It is called by java and is also named by java.

  • It is called by a line of code and is named by the author.

  • It is called by a line of code and shares the name of the class.

  • It is called via "new" and shares the name of the class.

Explicação

Questão 7 de 10

1

A constructor can accept parameters if necessary.

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 8 de 10

1

What is the scope of a variable?

Selecione uma das seguintes:

  • What the variable can apply to.

  • How many times the variable can be used.

  • The region of the program that the variable can be used within.

  • The accuracy of the variable.

Explicação

Questão 9 de 10

1

What is an instance variable?

Selecione uma das seguintes:

  • A variable that only is used once.

  • A copy of a variable that is given to each object.

  • A variable that only applies to one instance (object).

  • A copy of a variable that applies to all objects in a program.

Explicação

Questão 10 de 10

1

A client should be aware of both the implementation details as well as the interface.

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação