Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 104 – Fall 2011 Exploring Computer Science Lecture 20: November 14, 2011 Procedural Abstraction and List Processing.

Similar presentations


Presentation on theme: "CS 104 – Fall 2011 Exploring Computer Science Lecture 20: November 14, 2011 Procedural Abstraction and List Processing."— Presentation transcript:

1 CS 104 – Fall 2011 Exploring Computer Science Lecture 20: November 14, 2011 Procedural Abstraction and List Processing

2 Schedule Today  Procedural Abstraction in App Inventor  List Processing in App Inventor  High Score List Processor Wednesday  No quiz  Return quizzes 5 and 6; last team homework  Big Data Lecture  Storing Databases Next Monday  Exam 2  Focus on App Inventor

3 General Idea Project example for today  Allow the user to enter high scores  Maintain a list of the top-5 highest scores Requirements  Procedure to initialize a list  Procedure to insert a new score into the proper location  Procedure to print contents of list to a textbox

4 List Processing Lists in App Inventor are similar to those in BYOB  Creating a list, selecting/replacing/removing/inserting  Functions for checking membership, location of an item, contents empty An error when going beyond the size of a list

5 Iterating over a list App Inventor offers the forRange and forEach control constructs

6 App Inventor Procedures App Inventor provides procedures that can receive arguments, and either return a result (like BYOB reporter) or not return a result (like BYOB command)

7 High Score List Keeper Variable declarations and simple events

8 High Score List Keeper insertItem

9 High Score List Keeper


Download ppt "CS 104 – Fall 2011 Exploring Computer Science Lecture 20: November 14, 2011 Procedural Abstraction and List Processing."

Similar presentations


Ads by Google