Chapter10 Slides - Chapter 10: Arrays and Structures MIS...

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

View Full Document Right Arrow Icon
Click to edit Master subtitle style Opportunity Chapter 10: Arrays and Structures MIS 304: Intro to Problem Solving and Programming
Background image of page 1

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

View Full DocumentRight Arrow Icon
You will learn how to… Create, populate and use arrays Use loops to manipulate an array Resize an array Create and use multi-dimensional arrays Create and use structures
Background image of page 2
Arrays and Structures Arrays and structures give a developer the ability to hold on to and manipulate large amounts of data at the same time Batch processing is fast, but limited to what can be done with one record at a time With arrays, all the data can be held at the same time The world runs on data
Background image of page 3

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

View Full DocumentRight Arrow Icon
Order by the Numbers Array A set of related data An a list of similarly typed data A group of related variables with same data type Index - unique number starting at zero assigned to each element of an array Variable Array
Background image of page 4
Arrays Items in an array all share the same name Each item in an array has a unique index number Between the two, every variable in an array can be accessed strPaint(2 ) strPaint(7 )
Background image of page 5

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

View Full DocumentRight Arrow Icon
Creating an Array Arrays must be declared like other variables All the data in the array must be of the same data type Arrays can be declared with a specific size or with no size Arrays can be populated when created or assigned values later
Background image of page 6
Array Syntax Array name is strPaint Creates an array to store 10 items Each item is a string Array starts out empty Number in parentheses must be an integer or a variable that represents an integer Dim strPaint(9) As String
Background image of page 7

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

View Full DocumentRight Arrow Icon
Populating an Array Values are assigned to an array element just like other variables strPaint(0) = "Royal Blue"
Background image of page 8
Reading Values from an Array Use array elements just like any other variable Like all mathematical statements in VB, both sides of the comparison operator must be the same data type lblPaintColor.Text = strPaint(0)
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 33

Chapter10 Slides - Chapter 10: Arrays and Structures MIS...

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

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