JavaScript is disabled on your browser.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
D
E
F
G
H
I
L
M
O
P
R
S
T
Z
S
ScratchPad
- Class in
<Unnamed>
Lab04
In this lab you will practice implementing classes, using APIs, and handling memory references.
You will implement a linked list for storing primitive int values.
ScratchPad()
- Constructor for class
ScratchPad
set(int, int)
- Method in class list.
IntList
Sets the data at a particular entry in this list.
For example, if myList is
[1, 2, 6, 3, 4]
then after calling myList.set(3, 9) it will be changed to
[1, 2, 6, 9, 4]
setData(int)
- Method in class list.
IntListEntry
Overwrite the data stored in the list entry with a new value
setNext(IntListEntry)
- Method in class list.
IntListEntry
Overwrite the reference to the subsequent list entry.
sum()
- Method in class list.
IntList
Computes the sum of the values stored in the list
Use a loop, getLength(), and get()
A
B
D
E
F
G
H
I
L
M
O
P
R
S
T
Z
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes