LESSON 13 – INTRO TO ARRAYS

Slides:



Advertisements
Similar presentations
1 Working with Classes Chapter 6. 2 Class definition A class is a collection of data and routines that share a well-defined responsibility or provide.
Advertisements

 DATA STRUCTURE DATA STRUCTURE  DATA STRUCTURE OPERATIONS DATA STRUCTURE OPERATIONS  BIG-O NOTATION BIG-O NOTATION  TYPES OF DATA STRUCTURE TYPES.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
Introduction to Access. Access 2010 is a database creation and management program.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Python Programing: An Introduction to Computer Science
JavaScript: API’s, Parameters and Creating Functions with Parameters
Introduction toData structures and Algorithms
Computers’ Basic Organization
Lecture 10 Collections Richard Gesick.
Canvas and Arrays in Apps
CS703 - Advanced Operating Systems
Unit 5 Lesson 3: Introduction to Arrays
FOP: JavaScript Arrays(Lists)
Now with a speaking professor! (hopefully...)
CSC 221: Computer Programming I Spring 2010
Containers and Lists CIS 40 – Introduction to Programming in Python
Creating Functions with Parameters
7th Grade Big Ideas.
CSC 221: Computer Programming I Fall 2005
UNIT 2 – LESSON 6 ENCODE AN EXPERIENCE.
UNIT 3 – LESSON 5 Creating Functions.
UNIT 4 - BIG DATA AND PRIVACY
The Need for Programming Languages
APIs and Function Parameters
RAPID RESEARCH DATA INNOVATIONS
Cse 373 April 12th – TreEs.
Practice PT - Design a Digital Scene 3 days
Interfaces and Inheritance
Introduction to Problem Solving and Programming CS140: Introduction to Computing 1 8/19/13.
While Loops BIS1523 – Lecture 12.
Chapter 15 QUERY EXECUTION.
Sorting CSCE 121 J. Michael Moore
Lecture 10 List Richard Gesick.
The ArrayList Class An ArrayList is a complex data structure that allows you to add or remove objects from a list and it changes size automatically. The.
Lesson 17: Building an App: Canvas Painter
LESSON 14 - Building an App: Image Scroller
Lesson 16: Functions with Return Values
Lesson 6: User Input and Strings
Lesson 15: Processing Arrays
Arrays We often want to organize objects or primitive data in a way that makes them easy to access and change. An array is simple but powerful way to.
Learning in Mathematics
Lesson 5: Building an App: Clicker Game
Creating Functions with Parameters
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
Data Structures – 1D Lists
Unit 3: Lesson 6 & 7- Functions and Top-Down Design / APIs and Function Parameters Day 27.
CS Data Structure: Heaps.
RAPID RESEARCH DATA INNOVATIONS
Lesson 09: Lists Class Chat: Attendance: Participation
Programming We have seen various examples of programming languages
Just Basic Lessons Mr. Kalmes.
How many objects can you create by drawing in the circles?
Programming Control Structures with JavaScript Part 2
Text Structure English 7 & 8.
#1 Make sense of problems and persevere in solving them
Introduction to Data Structure
Lesson 8: Creating Functions with Parameters
CSE 115 September 12, 2008.
Amortized Analysis and Heaps Intro
Computational Thinking
Chapter 10 Thinking in Objects Part 1
Just Basic Lessons Mr. Kalmes.
Mod 3 Lesson 2 Me First! Sorting
U3L8 Creating Functions with Parameters
Year 2 Summer Term Week 13 Lesson 1
Arrays.
Year 2 Summer Term Week 13 Lesson 1
Modern Collections Classes & Generics
Introduction to Computer Science
Presentation transcript:

LESSON 13 – INTRO TO ARRAYS UNIT 5 – FRIDAY, JAN 12, 2018

VOCABULARY ALERT! Array - A data structure in JavaScript used to represent a list. List - A generic term for a programming data structure that holds multiple items.

PURPOSE: Identify an array as a data structure used to store lists of information in programs. Create arrays and access information stored within them using an index. Manipulate an array using the append, insert, and remove operations. Account for the fact that JavaScript arrays are zero- indexed when using them in a program.

Some sort of list data structure is a component of almost all programming languages. 

 A list allows large amounts of information to be easily referenced and passed around a program, and the use of a numeric index allows individual items in a list to be accessed.

A JavaScript array is actually another example of abstraction A JavaScript array is actually another example of abstraction. We know that it is holding a list of related information, but we don’t need to think about the actual implementation details.

What makes lists useful in everyday life What makes lists useful in everyday life? Today we’re going to start looking at how we can use lists in programs, but before we dive into that, let’s think about why we would want to in the first place. What are the benefits of creating lists? Why is it helpful to keep information in lists?

Lists are helpful because: Lists help us organize information. Lists help us collect all the relevant information in one place. Lists show that a lot of ideas are related. Lists help us order or prioritize ideas. Lists help us think about the big picture.

Variables are a bad way to store lists Variables are a bad way to store lists. Right now, the only way we know how to store information in our programs is with a variable, but each variable can only store a single piece of information.

There are a lot of benefits to keeping lists of information in real life. Since we use programming to solve a lot of similar problems, we would like to keep lists of information in our programs, too.

Today you’ll be learning about a new programming construct that will allow us to hold as many pieces of information as you want within a single list. This is an array.

Learn how to design arrays to hold a variety of information Learn how to design arrays to hold a variety of information. Access information in an array by its index. Develop a simple application that uses an array.

Open Code Studio Watch the different videos, and do each step Open Code Studio Watch the different videos, and do each step! There are a lot of steps, but you should be able to work through them easily.

When to use a variable and when to use an array: Variables store single pieces of information, while arrays store many. An array can grow in size to accommodate more information. Arrays are slightly more complex to use than variables. If you are only going to be storing a small and fixed amount of information, it is probably appropriate to use multiple variables.

TURN IN FOR A GRADE: #7 – myNumbers #14 – removing items #26 – favorite things #29 – user adds stuff but remains in bounds