๐ฎ 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:
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.
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
Last updated
Was this helpful?