GoConqr has a new look! Let us know what you think.

Quiz

Computer Science Quiz: Writing Custom Classes

Chris Fraser 10 questions 5.0 (1 rating)

Take the quiz

Questions in this quiz (10)

  1. 1An object has...?
    1. AState and Behaviour.
    2. BActions and Classes.
    3. CMethods and Code.
  2. 2How many objects can a class have?
    1. A234
    2. B2
    3. CAs many as we want
    4. D100
  3. 3What type of declarations need to be made by a class?
    1. AState and Behavior
    2. BClass and Object
    3. CData and Method
  4. 4What is the toString method?
    1. AA method that makes two strings.
    2. BA method that combines two strings.
    3. CA method that prints a string representation of an object.
    4. DA method that returns a string representation of an object.
  5. 5What is a constructor?
    1. AA person who directs a choir or orchestra.
    2. BA person who builds buildings
    3. CA method used to set up an object upon its creation.
    4. DA method used to build a class.
  6. 6How is a constructor called and how is it named?
    1. AIt is called by java and is also named by java.
    2. BIt is called by a line of code and is named by the author.
    3. CIt is called by a line of code and shares the name of the class.
    4. DIt is called via "new" and shares the name of the class.
  7. 7A constructor can accept parameters if necessary.
    1. ATrue
    2. BFalse
  8. 8What is the scope of a variable?
    1. AWhat the variable can apply to.
    2. BHow many times the variable can be used.
    3. CThe region of the program that the variable can be used within.
    4. DThe accuracy of the variable.
  9. 9What is an instance variable?
    1. AA variable that only is used once.
    2. BA copy of a variable that is given to each object.
    3. CA variable that only applies to one instance (object).
    4. DA copy of a variable that applies to all objects in a program.
  10. 10A client should be aware of both the implementation details as well as the interface.
    1. ATrue
    2. BFalse

Information

Description
Quiz on Computer Science Quiz: Writing Custom Classes, created by Chris Fraser on 06/11/2014.
Language
English
Views
44
Rating
5.0 out of 5 · 1 rating
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?