Chris Fraser
Test por , creado hace más de 1 año

Test sobre Computer Science Quiz: Writing Custom Classes, creado por Chris Fraser el 06/11/2014.

29
0
0
Sin etiquetas
Chris Fraser
Creado por Chris Fraser hace más de 9 años
Cerrar

Computer Science Quiz: Writing Custom Classes

Pregunta 1 de 10

1

An object has...?

Selecciona una de las siguientes respuestas posibles:

  • State and Behaviour.

  • Actions and Classes.

  • Methods and Code.

Explicación

Pregunta 2 de 10

1

How many objects can a class have?

Selecciona una de las siguientes respuestas posibles:

  • 234

  • 2

  • As many as we want

  • 100

Explicación

Pregunta 3 de 10

1

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

Selecciona una de las siguientes respuestas posibles:

  • State and Behavior

  • Class and Object

  • Data and Method

Explicación

Pregunta 4 de 10

1

What is the toString method?

Selecciona una de las siguientes respuestas posibles:

  • 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.

Explicación

Pregunta 5 de 10

1

What is a constructor?

Selecciona una de las siguientes respuestas posibles:

  • 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.

Explicación

Pregunta 6 de 10

1

How is a constructor called and how is it named?

Selecciona una de las siguientes respuestas posibles:

  • 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.

Explicación

Pregunta 7 de 10

1

A constructor can accept parameters if necessary.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 8 de 10

1

What is the scope of a variable?

Selecciona una de las siguientes respuestas posibles:

  • 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.

Explicación

Pregunta 9 de 10

1

What is an instance variable?

Selecciona una de las siguientes respuestas posibles:

  • 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.

Explicación

Pregunta 10 de 10

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación