ch 8 Data Structures in Alice

ch 8 Data Structures in Alice - Arrays and Lists Arrays...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
An Introduction to Programming with Alice Data Structures  Data Structures  in Alice in Alice
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Data Structures in Alice Data Structures in Alice Alice has two built-in data structures that can be used to organize data, or to create other data structures: Lists Arrays
Background image of page 2
Lists Lists A list is an ordered set of data. It is often used to store objects that are to be processed sequentially. A list can be used to create a queue.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Arrays Arrays An array is an indexed set of variables, such as dancer [1] , dancer [2] , dancer [3] ,… It is like a set of boxes that hold things. A list is a set of items. An array is a set of variables that each store an item.
Background image of page 4
Arrays and Lists Arrays and Lists You can see the difference between arrays and lists when you delete items.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Arrays and Lists Arrays and Lists In a list, the missing spot is filled in when something is deleted.
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Arrays and Lists Arrays and Lists In an array an empty variable is left behind when something is deleted. Lists Lists In an array an empty variable is left behind when something is deleted. Lists Lists A list is created in Alice by checking the make a list box when creating a new variable. Make a list box Lists Lists The For all in order and For all together tiles can be used to work with lists. They are at the bottom of the editor area. Arrays Arrays Arrays can be created in a similar manner, but more often they are created using the array visualization object from the Alice local gallery. The Array Visualization object has special properties and methods for manipulating the elements in an array. Arrays Arrays Alice has a set of built-in functions that can be perfomed on...
View Full Document

This note was uploaded on 10/17/2011 for the course CIS 106 taught by Professor Alice during the Spring '11 term at Community College of Philadelphia.

Page1 / 12

ch 8 Data Structures in Alice - Arrays and Lists Arrays...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online