Greenfoot Ch 1 Practice

11 Questions | Total Attempts: 404

SettingsSettingsSettings
Greenfoot Quizzes & Trivia

Answer the following questions below over method concepts, boolean literals, and programming code.


Questions and Answers
  • 1. 
    In object-oriented programming a class is
    • A. 

      A group of people sharing the same relationship to the means of production.

    • B. 

      The term used for programs

    • C. 

      A model or template from which objects are created

    • D. 

      A grouping of users sharing common objectives

    • E. 

      A procedure for a calculation inside a program.

  • 2. 
    In object-oriented programming a method is
    • A. 

      A design technique for creating classes

    • B. 

      A disciplined way of writing programs

    • C. 

      An approach developed by the great Stanislawski

    • D. 

      A process for instantiating an object

    • E. 

      Code that allows access to an object's attributes or that carries out some other action for the object.

  • 3. 
    The return type of a method
    • A. 

      Specifies the number of items a method returns

    • B. 

      Specifies what a method call will return

    • C. 

      Specifies the type of data that a method will accept.

    • D. 

      Is always void

  • 4. 
    To pass additional data to a method we specify a
    • A. 

      Name

    • B. 

      Return type

    • C. 

      Parameter

    • D. 

      Parenthesis

  • 5. 
    When a method returns nothing this special word is used for the return type:
  • 6. 
    Changing the flow of control in a program to jump to some pre-written code is known as ___________________ a method.
  • 7. 
    Write a literal representing the false value.
  • 8. 
     Write a literal representing the true value.
  • 9. 
    The code that a programmer writes is called _______________ code.
  • 10. 
    A compiler
    • A. 

      Maintains a collection of programs

    • B. 

      Tests a program's logic

    • C. 

      Translates source code into executable code

    • D. 

      Translates executable code to machine code

  • 11. 
    Given an integer variable  drivingAge that has already been declared, write a statement that assigns the value  17 to  drivingAge . So, after your code is executed, the variable drivingAge, will have the value  17.
Back to Top Back to top