list length
how many elements it contains (inside of the indexes)
list
a container used to keep similar pieces of data organized in on place
List Actions
Append, Insert, Remove
Iteration
a repetitive portion of an algorithm which repeats a specified number of times or until a given condition is met
infinite loop
A loop in which the terminating condition is never satisfied. Ending condition can never evaluate to true
FOR loop
A typical looping construct designed to make it easy to repeat a section of code using a counter variable. The for loop combines the creation of a variable
while loop
a programming construct used to repeat a set of commands (loop) as long as (while) a boolean condition is true
_____ loops are in great danger of becoming infinite
While
index
Numerical address of an item in a list
Function in Java that adds an item anywhere in a list
insertItem()
A function in Java that adds an item to the end of a list
appendItem()
A function in Java that removes an item in the list
removeItem()
Element
is an individual value in a list that is assigned a unique index
index
a common method for referencing the elements in a list or string using numbers
Lists are an example of...?
Data abstraction. They allow us to name and program with large collections of information while ignoring the low level details of how the data is stored
filter
Creates a subset of elements from the original list
reduce
reduce the list down to a single element
Traversal
the process of accessing each item in a list one at a time
How do you access each element?
We can access each element by evaluating list[i] in the for loop.
data set
an organized collection of data that can be used in an application to make it more robust