CS2400 M5 Flashcards

1
Q

List

A

A collection of same-type data in order.
Items may be added anywhere.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List methods

A

*getLength
isEmpty
add(entry)
*add(pos, entry)
*remove(pos)
*replace(pos, newEntry)
clear
*getEntry(pos)
contains(entry)
toArray

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is JavaDoc

A

JavaDoc is a file created upon executing the generation program. It creates documentation for your code based on the notation you made.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

List vs bag

A

List is ordered and 2D, with position and entry values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

JUnit

A

A test program that tests the implementation of a method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

LinkedList add

A

Cases
1: empty list
2: add to beginning
3: add to middle
4: add to end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Head vs tail reference

A

A reference to firstNode as well as lastNode, to increase method efficiency. Allows some methods to go from O(n) to O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

List vs stack

A

Spatial order vs reverse chronological order. In a stack, you can only access the most recent addition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Program stack

A

Java stack is a stack of activation records. Contains arguments, local variables, and reference.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly