{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
Image of page 1

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

View Full Document Right 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
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.
Image of page 3

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

View Full Document Right 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.
Image of page 4
Arrays and Lists Arrays and Lists You can see the difference between arrays and lists when you delete items.
Image of page 5

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

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

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

View Full Document Right Arrow Icon
Image of page 8
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
Image of page 11

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern