< >
Join now to discover more
or create your own Quizzes
Quiz
GoConqr is a social learning network with free tools, resources, courses and groups.
already a member? Log in

Computer Science Quiz: Writing Custom Classes

Question 1 of 10

Medal-premium 1

An object has...?

Select one of the following:

  • State and Behaviour.

  • Actions and Classes.

  • Methods and Code.

Question 2 of 10

Medal-premium 1

How many objects can a class have?

Select one of the following:

  • 234

  • 2

  • As many as we want

  • 100

Question 3 of 10

Medal-premium 1

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

Select one of the following:

  • State and Behavior

  • Class and Object

  • Data and Method

Question 4 of 10

Medal-premium 1

What is the toString method?

Select one of the following:

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

Question 5 of 10

Medal-premium 1

What is a constructor?

Select one of the following:

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

Question 6 of 10

Medal-premium 1

How is a constructor called and how is it named?

Select one of the following:

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

Question 7 of 10

Medal-premium 1

A constructor can accept parameters if necessary.

Select one of the following:

  • True
  • False

Question 8 of 10

Medal-premium 1

What is the scope of a variable?

Select one of the following:

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

Question 9 of 10

Medal-premium 1

What is an instance variable?

Select one of the following:

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

Question 10 of 10

Medal-premium 1

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

Select one of the following:

  • True
  • False
Icon_fullscreen

Computer Science Quiz: Writing Custom Classes

Chris Fraser
Quiz by , created over 2 years ago

Quiz on Computer Science Quiz: Writing Custom Classes, created by Chris Fraser on 11/06/2014.

Eye 19
Pin 0
Balloon-left 0
Tags No tags specified
Chris Fraser
Created by Chris Fraser over 2 years ago
Close