[1.0 JS] Introduction to Computational Media
  • Introduction to Computational Media
  • How to Use this Curriculum
  • Submit Feedback
  • Curriculum Extras
    • 🔮Curriculum Extras Overview
    • Imposter Syndrome (pt. 1)
      • Imposter Syndrome (pt 2)
    • Timers in p5.js
    • Time Functions: Crazy Clock Mini Project
    • Using Sliders
    • Getting Sound from Mic
    • Sound Recognition with ml5
  • Unit 1: Drawing, Variables, and Random
    • 🔮Unit 1 Overview
    • U1LA1.1 p5.js Introduction & Deconstruction
    • U1LA1.2 Line Functions and Parameters
    • U1LA1.3: Rectangles, Ellipses, and Layering
    • U1LA1.4 Various Shapes, Stroke, Weight, Fill
    • 🗃️🗃U1LA1 Mini Project: Taijitu Symbol
    • U1LA2.1 Intro to Variables - System Variables
    • U1LA2.2 Custom Variables in p5.js
    • U1LA2.3 Random Function & Variables
    • 🗃️🗃U1LA2 Mini Project: Custom Emoji pt. 1
    • U1LA.3.1 Intro to Color
    • U1LA3.2: RGB vs HSB Color Modes
    • U1LA3.3 Color Palettes & Design
    • 🎨🎨 Unit 1 Final Project: Abstract Album Art
  • Unit 2: Respond & Draw on Canvas
    • 🔮Unit 2 Overview
    • U2LA1.1 - Conditionals and if statements
    • U2LA1.2 - Conditionals and if, else if, else statements
    • U2LA1.3 - Logical Operators And/Or
    • 🗃️🗃U2LA1 Mini Project: Make a Traffic Light 🚦
    • U2LA1.4: Draw with Mouse
    • U2LA1.5: The Map Function
    • U2LA2.1 - Collision with Collide2D
    • U2LA2.2: Mouse Clicks && Shapes As Buttons
    • 🗃️🗃U2LA2 Mini Project: Light Switch Game
    • U2LA3.1: Key Presses && Nested Conditionals
    • 🎨🎨 Unit 2 Final Project: Interactive Drawing App
  • Unit 3: Arrays, Loops, Media
    • 🔮🔮 Unit 3 Overview
    • U3LA1.1: While Loops
    • U3LA1.2: For Loops Pt 1
    • U3LA1.3: Nested For Loops (For Loops pt 2)
    • 🗃️🗃U3LA1 Mini Project: Wallpaper Design
    • U3LA2.1: Introduction to Arrays
    • U3LA.2.2: Arrays with floor() and random()
    • 🗃️🗃U3LA2 Mini Project 1: Fortune Teller
    • U3LA2.3: Loops and Arrays
    • 🗃️🗃U3LA2 Mini Project 2: Random Starfield
    • U3LA3.1: Preload && Images
    • U3LA3.2: Tint && Image Manipulation
    • 🗃️🗃U3LA2 Mini Project 3: Vision Board
    • U3LA3.3: Images and Arrays with ml5
    • U3LA4.1 Fonts && Text Styling
    • 🗃️🗃U3LA4 Mini Project 4: Typography
    • U3LA5.1: Loading & Playing Sound Files
    • 🗃️🗃U3LA5 Mini Project: Keyboard/Patatap
  • 🎨🎨Unit 3 Final Project: Random Meme Generator
  • Unit 4: Motion, Animation, Transformation
    • 🔮🔮 Unit 4 Overview
    • U4LA1.1: Intro to Motion with Flipbooks
    • U4LA1.2: Move In All Directions & Make it Bounce
    • 🗃️🗃 U4LA.1: Make a Floating DVD Logo
    • U4LA2.1: Translation Battleship
    • U4LA2.2: Rotations
    • U4LA3.1: Sine & Oscillating Motion
    • U4LA3.2: Cosine & Circular Motion
    • 🎨🎨 Unit 4 Final Project: Animated Greeting Card/PSA
  • Unit 5: Functions & Abstraction
    • 🔮🔮 Unit 5 Overview
    • U5LA1.1: What is Abstraction?
    • U5LA1.2: Intro to Functions & Function Calls
    • U5LA1.3: Draw with Functions
    • 🗃️🗃 U5LA1 Mini Project: Custom Function Library
    • U5LA2.1: Data Type Scavenger Hunt
    • U5LA2.2: Functions that Return Values
    • U5LA2.3: Functions with Purpose
    • U5LA2.4: Functions with Boolean Returns
    • 🗃️🗃 U5LA2 Mini Project: Build Your Own Challenge
    • 🔮🔮 Unit 5 Final Project: Menu of Options
Powered by GitBook
On this page
  • Overview
  • Blueprint Foundations Student Outcomes
  • NYS Standards
  • CSTA Standards
  • Suggested Duration
  • Prerequisites
  • Assessment
  • Overview of Instructional Materials

Was this helpful?

  1. Unit 5: Functions & Abstraction

🔮 Unit 5 Overview

How can I abstract processes for clarity and reuse?

Overview

In this unit, students are introduced to abstraction through the writing of custom functions. Students go from drawing within the draw loop, to drawing within a function they create, to adding parameters to it and a return value.

Abstraction and functions can be complicated and confusing topics for students to wrap their heads around, as they involve thinking that students may not have embarked on before. That being said, this unit comes at the end of the course for two reasons:

  1. Students have by now felt the pain of coding repeated processes by hand and will be eager for the efficiency of functions that can perform repeated actions easily.

  2. Abstraction - and functions - are both enormous topics in the AP CSP exam, so this primes them to dig deeper into those in future courses.

Deep breaths if it seems like students' heads are scrambled by these big concepts in computing as they embark on this unit; the best way to make abstraction and functions clearer is to offer a multitude of different examples and offer lots of space for practice.

For many, this is also the final unit of ICM (unless you have time for the two remaining optional units), so enjoy watching the culmination of skills!

Blueprint Foundations Student Outcomes

  • Abstraction, Decomposition: Ideas, problems, or projects are broken down into component parts to set the stage for deeper analysis.

  • Abstraction, Generalization and Detail Removal: Component parts are grouped by general characteristics, and unnecessary details filtered out.

  • Abstraction, Modularity: A process that completes a single task is more useful when it can be chained together with other processes to accomplish something more complex.

  • Algorithms, Inputs, Variables && Outputs: ​​How data is passed into (inputs) manipulated by, used within (variables) and returned from the algorithm (outputs).

  • Algorithms, Application: ​​Understanding where, when, why and how to apply algorithms and which algorithm to apply in a given context.

NYS Standards

  • 9-12.CT.4 Implement a program using a combination of student-defined and third-party functions to organize the computation.

  • 9-12.CT.5 Modify a function or procedure in a program to perform its computation in a different way over the same inputs, while preserving the result of the overall program.

  • 9-12.CT.8 Develop a program that effectively uses control structures in order to create a computer program for practical intent, personal expression, or to address a societal issue.

  • 9-12.CT.9 Systematically test and refine programs using a range of test cases, based on anticipating common errors and user behavior.

CSTA Standards

  • 3A-AP-15 Justify the selection of specific control structures when tradeoffs involve implementation, readability, and program performance, and explain the benefits and drawbacks of choices made.

  • 3A-AP-17 Decompose problems into smaller components through systematic analysis, using constructs such as procedures, modules, and/or objects.

Suggested Duration

18 - 25 Days (Pacing Dependent)

Prerequisites

This end of unit course should come after students have mastered the following basic skills:

  • Drawing with shapes and utilizing built-in functions from the p5.js library

  • Variables

  • Conditional Statements

  • Loops

  • Arrays

  • Incrementing

  • Variables

Assessment

Formative Assessments: Each lesson contains suggestions for deliverables that could be evaluated as a formative assessment for that day’s learning.

Summative Assessments: Redo a past project using custom functions

Overview of Instructional Materials

The following lessons include links to useful resources and starter code, as well as suggestions for how the lessons could best be implemented. Feel free to take your own liberties in making adjustments to what feels best for your own classroom.

Sequence of Lessons:

LA1: Drawing Functions

  • LA1.1: What’s Abstraction?

  • LA1.2: Intro to Functions && Function Calls

  • LA1.3: Draw with Functions

  • Mini Project: Custom Function Library

LA2: Functions that Return Values

  • LA2.1: Data Types/Scavenger Hunt

  • LA2.2: Functions that Return Numbers (DeltaMath Activity)

  • LA2.3: Functions with Purpose

  • LA2.4: Functions with Boolean Returns (Collision Detection Activity)

  • Mini Project: Build Your Own Challenge

Final Project:

Final Project: Menu of Options

Previous🎨 Unit 4 Final Project: Animated Greeting Card/PSANextU5LA1.1: What is Abstraction?

Last updated 3 years ago

Was this helpful?

🔮