CPT Plan
College Board CPT Plan
Outline
My feature planned for the Create Performance Task is a todo list where a user can manipulate a series of todos via addition, deletion, and completion. I plan to satisfy all the CollegeBoard criteria as such:
- Program Purpose and Function: I will describe the input, program functionality, and output of the
addTodo
procedure within my code. The input is the text of the new todo to be added. The functionality is that it creates a new JavaScript object containing the todo text and a completion status. It then creates a new list from the todo list but adds the new todo to it. The output is the newly created todo list. The output of theaddTodo
function will be passed to thesetTodos
function, which displays the todos on screen. - Data Abstraction: I will describe how my data is stored in a list and how it contributes to the program function. I will describe how the todos are added to a central list which are manipulated by the
addTodo
,deleteTodo
, andcompleteTodo
functions. The list will be used for the rendering function that uses the todoList as input and renders the resulting todos on the HTML page. - Managing Complexity: the todo list manages complexity within the program by storing all the todos in an ordered fashion. It allows for the manipulation of a set of todos using addition, deletion, and completion functions. I will discuss how it is a replacement for storing todos individual variables and is much more easy to program this way.
- Procedural Abstraction: I will discuss how my student-developed
completeTodo
procedure has an input of a todo ID, searches for a todo within a list by its ID, and modifies its completion status based on the procedure’scompleted
parameter. It contributes to the program function because it is essential for toggling the todo’s status when a user has either completed or marked a todo incomplete. - Algorithm Implementation: I will discuss the
render
algorithm within my todo program. Therender
algorithm leverages sequencing as it loops through the entire list of todos. It leverages selection by using anif
statement to determine whether each todo it’s looping through is completed or not. Based on the result, it toggles the CSScompleted
class to alter the appearance of the todo. Iteration is used within the for loop to increment the index of the selected todo in the todoList. - Testing: I will write a testing procedure that tests the state of the todoList after running the
addTodo
,removeTodo
, andcompleteTodo
respectively. It will ensure that each procedure works properly by asserting whether the todoList contains the expected values after each method. It will print the result of each test in order to properly identify the result of each call.
Video Plan
I plan to cover all of the above points comprehensively in my video. I will address all of the CollegeBoard criteria as specified in the rubric and detailed above.