Card Set Information

2013-12-09 11:35:41

Hruby Part 1 of last test.
Show Answers:

  1. _______ oriented programming uses different terms than linear programming.
  2. ____ says that a program is made up of "objects".
  3. An object contains "______ and _______" within. This is said to be ___________.
    • data
    • behaviors
    • encapsulation
  4. In linear programming, ________ and _______ are separated.
    • data
    • functions
  5. Methods are _________ or ________ (calcuates Federal Tax deduction from grosspay.)
    • procedures
    • functions
  6. Older programmers refer to methods as _______, because they are sub-functions of a larger program.
  7. A "class" is like a ________ for creating objects.
  8. A class may be thought of as an apple pie; while the baking (or creation of the object) is called ______________.
  9. A class is formally called a ___________ for creating objects.
  10. A METHOD is a small program that has a _________, _________, a _________ (process), and possibly returns (gives back) __________.
    • name
    • variables
    • body
    • parameters
  11. Those METHODS that DO NOT return a parameter have the word __________ in their first line (header).
  12. A _________ is a collection of statements that are grouped together to perform a function or procedure.
  13. We ________ or "call a method" when we want ito to perform/execute.
  14. _________ __________ is the combination of the method name and the parameter list; this this compose the "method header".
    Method signature
  15. The variables defined in the method header are known as ________ _________.
    formal parameters
  16. When a method is invoked, you _______ _ ______ to the parameter. This passed value is referred to as an ________ _________ or ___________.
    • pass a value
    • actual parameter
    • argument
  17. The _____________ is the data type of the value the method returns.
  18. If the method does not return a value, the returnValueType is the keyword _________.
  19. A ________ statement is required for a value-returning method.
  20. Stacks are areas in _______ _________.
    Primary Memory
  21. When you invoke the method using:
    nPrintln("Welcome to Java", 3);
    what is the output?
    • Welcome to Java
    • Welcome to Java
    • Welcome to Java
  22. ____________ involves supplying different meanings for a single identifier.
  23. ________ a _______ means writing multiple methods with the same name but different parameter lists.
    • Overloading
    • method
  24. When we call an overloaded method , the IDE understands which version of the method to use based on the _______ _______ used.
    parameter lists
  25. True or False?
    Overloading methods is never required in a program.
  26. The only advantage of overloading methods is provide to your method's ________.
    users (clients)
  27. Instead of overloading a method, you could instead create multiple different methods with _______ ________.
    unique identifiers
  28. ___________ methods are situations in which the compiler cannot determine which method to use.
  29. Every time you call a method, the Java IDE compiler decides whether a suitable method exists.
    If so the method _________.
    If not, you receive an ________ _______.
    • executes
    • error message
  30. A ________ variable is a variable defined within a method.
  31. ________ is the part of the program where the variable can be referenced (identified and used).
  32. A local variable must be _______  before it can be used.
  33. A local variable cannot be used ________ of the method where it was defined.
  34. The scope of a local variable starts from its ____________ and continues to the _____ ___
    ______ _____.
    • declaration
    • end of the block
  35. Each time you correctly declare a variable with the same name, a separate and different _______ _______ is assigned to it.
    storage area
  36. Can you declare a local variable with the same name multiple times in different non-nesting blocks in a method?
  37. Can you declare a local variable twice in nested blocks?
  38. 3 benefits of METHODS:
    • 1. Write a method once and reuse it anywhere.
    • 2. Information hiding.
    • 3. Reduce complexity.
  39. Method _________ is achieved by separating the use of a method from its implementation.
  40. When the details of t the implementation are encapsulated in the method and hidden from the client who invokes the method, it is knows as information ________ or _________.
    • hiding
    • encapsulation
  41. The arguments that are passed to a method should have the same _______, ________, and ________ as the parameter in the method signature.
    • number
    • type
    • order
  42. The method header specifies the __________, return value type, ______ ______ and _________ of the method.
    • modifiers
    • method name
    • parameters
  43. The signature of a method consist of _________ ________ and ________ _______.
    • method name
    • parameter list
  44. public static ______ main(String args[])
  45. public static void main(_________ ____ ___)
    String args[]
  46. Arguments to methods always appear in _________.
  47. Each time a method is invoked, the system stores parameters and local variables in an area of memory, known as a ____________.
  48. A _____ is a simple but incomplete version of a method.
  49. When you invoke a method with a parameter, the value of the argument is passed to the parameter. This is referred to as _____ ___ ____.
    pass by value