Data Structures Quiz 1

  1. Data Structure
    Organized collections of data organized so that items can be stored and retrieved by some fixed techniques
  2. Byte Codes
    Code is translated into an intermediate form of code, byte code to make it easier to move programs between machines
  3. Java Runtime Environmet
    Controlls all Java programs and available on a wide variety of machines. this is why it is easy to move java programs between machines
  4. Algorithm
    • a procedure or sequence of directions for solving a problem
    • part of the design phase of the program
  5. Code Reuse
    • a single method can be  used by many programs for similar tasks
    • may be pre-written or you can write your own for specific use
    • EX system.out.printf(...).
  6. Information Hiding
    • Know something about what the other methods do.  Only as much as you need to know but no more
    • Write all methods seprately instead of trying to write whole program at once
  7. Method Signature
    • method name, parameter list, return type, any modifiers
    • info on method
    • EX: public static double celciusToFahrenheit(double c)
    • public static - modifiers
    • double - return type
    • celciusToFahrenheit - method name
    • double c - parameter list
  8. Procedural Abstraction
    • simplifies your reasoning by allowing you to consider methods one at a time rather than all together
    • not look at how a method is implimented
    • abstract away irrelevant details about how a method works
  9. precondition
    a condition that is supposed to be true when a method is called
  10. Postcondition
    a complete statement describing what will be true when the method finishes
  11. Exceptions
    • if procondition fails program may do strange things.
    • Indicate that illegal argument has occured 
    • detect that precondition has been violated, halt its own work, pass a message, called an exception, to the calling program to indicate that an illegal argument has occured
  12. Throwing an exception
    the act of halting your own work and passing a message to the calling program
  13. Javadoc comments
    automatically produced by Javadoc, nicely formatted information about a class
  14. Final Variable
    Value will never be changed while the program is running
  15. Format String
    tells how subsequent arguments should be printed
  16. Format Spcifiers
    part of the format string that begins with the % character.  Indicates how the next item should be printed
  17. Field Width
    • length of the number including the decimal point.
    • EX %6.2f - field width = 6  _ _ _ . _ _
  18. Precision
    • number of decimal places.
    • EX %6.2f - precision = 2 _ _ _ . _ _
  19. Testing of boundary values
    • boundary value is one step away from a different kind of behavior
    • If you cannot test all possible values then test the boundary values, 0, 1, and -1.
  20. Assertions
    • boolean expressions that can be checked for validity while the program is running
    • assist in debugging and maintaining programs by documenting conditions that the programmer intends to be valid at specific locations in the program.
    • automatically flag invalid assertions
    • if assertion is true no action is taken, if false the exception called an assertion error is thrown
    • "Each assertion contains a boolean expression that you believe will be true when the assertion executes. If it is not true, the system will throw an error. By verifying that the boolean expression is indeed true, the assertion confirms your assumptions about the behavior of your program"
Card Set
Data Structures Quiz 1
Chapter 1 vocab