CS1302 Exam 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:45 PM on 10/28/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

Linked list

a sequence of objects where one object references the next

2
New cards

Linked lists are stored in contiguous memory

False, they can grow dynamically without the need to reallocate memory

3
New cards

Abstract Data Type

describes what operations can be performed on data, not how they are implemented

4
New cards

The List add method

shifts object currently at that position and any subsequent objects to the right

5
New cards

The List remove method

shifts object currently at that position and any preceding objects to the left

6
New cards

Code from the List interface is compatible with

implementing classes (polymorphism)

7
New cards

If we were to lose the head reference, we would lose access to

the first node

8
New cards

pro to an array

fast access to elements

9
New cards

con to an array

expensive to resize

10
New cards

pro to a linked list

easy to add new elements

11
New cards

con to a linked list

slower access to elements

12
New cards

if no variable stores a node

it becomes unreachable

13
New cards

which visibility does not require a modifier keyword

package private

14
New cards

least to most visibility

private, package private, protected, public

15
New cards

where can we view private members

same class

16
New cards

where can we view package private members

same class, same package

17
New cards

where can we view protected members

same class, same package, child class

18
New cards

where can we view public members

same class, same package, child class, elsewhere

19
New cards

even if methods are public…

the class must be visible first to use that method