cse 2231 final

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/6

flashcard set

Earn XP

Description and Tags

lord pray for me

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

7 Terms

1
New cards

interfaces are different from classes because

  • it cannot be instantiated (i.e., can’t be object/dynamic types)

  • cannot extend classes

  • can hold private and public members (not different than a class)

2
New cards

constructors are/can…

  • can have a pre and post condition

  • are obligated to satisfy the representation invariant, if there is one

3
New cards

code is running, a checked exception occurs. what must be true?

  • it either occurred in a try block or in a method that throws it

  • some catch block executes, unless main() declares that it throws an exception of a type matching it

  • if a catch block executes, then the exception in the catch matches the thrown exception’s type

4
New cards

working with JCF’s Map<K, V> can be tricky because?

  • can’t iterate through a Map directly

  • using views backed up by the Map can lead to aliasing errors

  • it doesn’t offer a method with OSU’s Map’s removeAny’s behavior

5
New cards

when using java iterators on a set (OSU or JCF)

  • adding things to the set while you iterate is unsafe

  • can safely copy aliases to the elements if they’re immutable

    • using a for-each loop is a shorthand for a particular use of an Iterator object

6
New cards

design by contract requires

  • the client to be certain a method’s preconditions are satisfied

7
New cards

heap arrays…

  • use a way of storing data that implicitly represents a complete binary tree

  • can be used to sort data

  • can hold data in partially-sorted form until the smallest item is needed