Test 1 review Flashcards
abstract classes are used for…
setting up methods for subclasses
declaring private data fields
abstract method
method that has no body
can objects be created in abstract classes?
no
what overrides abstract methods?
concrete methods
how many interfaces can a class extend?
one
how many interfaces can a class implement?
multiple
interfaces contain
abstract methods
what’s a type?
a collection of values
simple type example
integer
aggregate type example
bank account
data item
piece of info drawn from a type
what does a data structure do?
implement an ADT
how does remove() work in a linked bag?
removes first item
if node is in a package what must it define?
set and get methods
removing the first node
set firstNode to reference the second node
decrement the number of entries