1 / 9

CS 104 – Fall 2011 Exploring Computer Science

CS 104 – Fall 2011 Exploring Computer Science. Lecture 20: November 14, 2011 Procedural Abstraction and List Processing. Schedule. Today Procedural Abstraction in App Inventor List Processing in App Inventor High Score List Processor Wednesday No quiz

dustyv
Télécharger la présentation

CS 104 – Fall 2011 Exploring Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 104 – Fall 2011Exploring 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

More Related