Computer Science Quiz: Writing Custom Classes

Beschreibung

Quiz am Computer Science Quiz: Writing Custom Classes, erstellt von Chris Fraser am 06/11/2014.
Chris Fraser
Quiz von Chris Fraser, aktualisiert more than 1 year ago
Chris Fraser
Erstellt von Chris Fraser vor mehr als 9 Jahre
29
0

Zusammenfassung der Ressource

Frage 1

Frage
An object has...?
Antworten
  • State and Behaviour.
  • Actions and Classes.
  • Methods and Code.

Frage 2

Frage
How many objects can a class have?
Antworten
  • 234
  • 2
  • As many as we want
  • 100

Frage 3

Frage
What type of declarations need to be made by a class?
Antworten
  • State and Behavior
  • Class and Object
  • Data and Method

Frage 4

Frage
What is the toString method?
Antworten
  • 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.

Frage 5

Frage
What is a constructor?
Antworten
  • 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.

Frage 6

Frage
How is a constructor called and how is it named?
Antworten
  • 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.

Frage 7

Frage
A constructor can accept parameters if necessary.
Antworten
  • True
  • False

Frage 8

Frage
What is the scope of a variable?
Antworten
  • 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.

Frage 9

Frage
What is an instance variable?
Antworten
  • 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.

Frage 10

Frage
A client should be aware of both the implementation details as well as the interface.
Antworten
  • True
  • False
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Der menschliche Körper
JohannesK
Öff. Recht - Streitigkeiten Verwaltungsprozessrecht
myJurazone
Differenzialrechnung (Analysis) Zusammenfassung
Antonia C
Euro-FH // Zusammenfassung PEPS2
Robert Paul
Systemwissenschaften 1 Teil Füllsack
Gustav Glanz
Vetie Immunologie
Kristin E
Vetie Radiologie 2019
Anna Nie
Chirurgie Pferd Vetie
Anne Käfer
Vetie - Recht 2020
Birte Schulz
Vetie Spezielle Pathologie 2020
Fioras Hu
Vetie - spez Patho 2019
Johanna Tr