Lesson 10: Practice PT - Design a Digital Scene
Overview
To conclude their introduction to programming, students will design a program that draws a digital scene of their choosing. Students will be working in groups of 3 or 4 and will begin by identifying a scene they wish to create. They will then use Top-Down Design to identify the high-level functions necessary to create that image. The group will then assign these components to individual members of the group to program. After programming their individual portion, students will combine all of their code to compose the whole scene. The project concludes with reflection questions similar to those students will see on the AP® Performance Tasks.
Note: This is NOT the official AP Performance Task that will be submitted as part of the Advanced Placement exam; it is a practice activity intended to prepare students for some portions of their individual performance at a later time.
AP® is a trademark registered and/or owned by the College Board, which was not involved in the production of, and does not endorse, this curriculum.
Purpose
Abstraction is an important tool in programming, not only because it allows individual programmers to break down complex problems, but because it enables effective forms of collaboration. Once a problem has been broken down into its component parts, teams of programmers (sometimes dozens or more) can attack individual components of that problem in parallel. This style of programming requires clear communication and a shared understanding of the high-level requirements of the software. If implemented carefully, however, it can be an effective strategy for rapidly producing large and complex pieces of software.
Agenda
Getting Started
Activity
Wrap Up
Extended Learning
View on Code Studio
Objectives
Students will be able to:
- Write programs that address one component of a larger programming problem and integrate with other similarly designed programs.
- Collaborate to break down a complex programming problem into its component parts.
- Use code written by other programmers to complete a larger programming task.
- Write responses to AP-style prompts
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the Students
- Code Print - Create PT Code Formatting
- Practice PT - Written Responses - Student AP Response Template
- Design a Digital Scene - Project and Programming Rubric
- Design a Digital Scene - AP Rubric 2019 - AP Rubric
- Design a Digital Scene - Project Guide 2019 - Project Guide
Vocabulary
- Abstraction - a simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity, focus on relevant concepts, and reason about problems at a higher level.
Teaching Guide
Getting Started
Goal: Review the programming constructs covered thus far, recall how they can be used within Top-Down Design to break down problems, and frame the coming project as a further exploration of the concept of abstraction.
Activity
Suggested Project Pacing
A proposed schedule of the steps of this project is included below, as well as more thorough explanations of how to conduct the various stages.
Day 1
- Review the project guidelines and the rubric.
- Assign students to groups to follow the Group Project Planning guide.
- Groups complete the Project Description document.
- Groups break target scene into high-level functions, define their behavior and complete the Project Component Table.
- Students begin programming individual components.
Day 2
- Students continue to work on programming their individual functions.
- Groups begin to recombine their functions and students begin work on their digital scenes.
Day 3
- Students finalize their digital scenes.
- Students complete their reflection questions and submit their projects.
Design a Digital Scene
Review the Project
Distribute:
Give each student a copy of the following (digital copies available on code studio):
- Design a Digital Scene - Project Guide 2019 - Project Guide
- Design a Digital Scene - AP Rubric 2019 - AP Rubric
- Design a Digital Scene - Project and Programming Rubric
Read Requirements: Read through the guidelines of the project together and address any high-level questions about the aims of the project. Students will have a chance to review the requirements once placed in groups.
Emphasize and call out connections to the AP Create PT: Students will be going through many of the same processes for this project as they will for the AP Create PT. The things we are not doing here are:
- student is not coming up with the idea for the project - we are framing it as Design a Digital Scene
- we are not making a video of code running
- we are ignoring the writing prompts about algorithms
We'll address these things later in Unit 5.
Place Students in Groups: Groups will ideally be 3 or 4 students for this project. You may place students in groups yourself or allow them to select their partners.
Complete Group Project Planning Guide
How to use the Group Project Planning Guide
We recommend using this guide on the first day of the project to help groups get organized and focus on the project requirements. It is not a document we recommend assessing or evaluating directly, beyond basic completion. See the project submission section below for more details.
Groups should use the Activity Guide’s Group Project Planning Guide to collaboratively develop their scene description and select a target image. They will then fill in the Project Component Table with the individual components of the scene, as well as their associated function names and descriptions. Finally, they will assign each function to one of the group members.
Start Programming
Teaching Tip
Reflection and Code Submissions: Make a determination of how best students can submit their reflection responses and Code.
If you want to mimic the actual performance task then:
- Have students write their responses in a document and save as a PDF
- Have students copy their code into CodePrint, draw a rectangle around the abstraction they are writing about, and then print/save that as a PDF
However, if you want to save those extra steps you can have students simply submit a digital document and submit their App Lab project through the Code.org site. You might ask students to identify with a comment in the code the abstraction they wrote about for their written responses.
Written Reflection and Program Code
Reflection Questions: Students can complete the reflection questions using the Practice PT - Written Responses - Student AP Response Template or simply write them into a plain text document.
Program Code: Students should simply submit their project code through Code Studio by clicking the Submit button where they composed their project.
Project Submission
It is up to you to define and provide instructions for how you want to collect student projects. The things you can collect are:
1. Student written responses - you can collect a digital doc (e.g. Google doc, Word doc), an AP-style PDF sent to you by some means (digital drive, email, etc.) or even a printed hardcopy. Use the Design a Digital Scene - AP Rubric 2019 - AP Rubric to score it. An exemplar is available in the teacher-only section on Code Studio.
2. Student code - You should always request they submit the project through Code Studio so it gets locked in. You may additionally want to have students mimic the AP requirement of submitting a PDF of their code with the abstraction they developed highlighted with a rectangle drawn around it. We recommend using CodePrint to do this. You can collect this as a PDF or ask students to print out a hardcopy.
If you would like to assess the student code for the programming concepts and skills developed in the unit use the Design a Digital Scene - Project and Programming Rubric. Exemplars are available in the teacher-only section on code studio.
3. Group planning guide - As mentioned above we do not recommend evaluating or assessing the group planning guide beyond basic completion. If you plan to use the Design a Digital Scene - Project and Programming Rubric the planning guide may be a useful artifact or aid for assessing the collaboration aspects of the project.
Wrap Up
Presentation (Optional): If time allows, students may wish to have an opportunity to share their digital scenes with one another. One option is to print out their digital scenes, but consider other options like creating a “Digital Art Gallery” by posting all links to a shared document.
Extended Learning
Incorporate Another Group’s Functions: Students who finish early or wish to have an added challenge can attempt to incorporate the functions of another group into their digital scenes.
- Lesson Overview
- Teacher Overview
- Student Overview
AP-style student submission
- Student Sample Submission for writing - Document showing student writing sample side by side with scoring guide and suggested scoring.
- Sample student code PDF - linked to in sample submission doc as well.
Exemplar programming projects
These sample App Lab projects contain inline comments explaining how they might be scored against the Project Programming Rubic.
- Full credit sample - Beach Scene
- Partial credit sample - Desert Scene
Please note there is small multi-chose assessment in the next lesson, the "Unit 3 Chapter 1 Assessment." You might use it immediately after, or as part of, evaluating this project.
Q: Where do I find the assessment that used to be linked in this space?
A: It has been moved into the online version you see for the "Unit 3: Chapter 1 Assessment" in the lesson that follows this one.
- Design Your Components
- 2
Teaching Tip
Program Functions: Students should work individually to program the functions they have been assigned. While they are responsible for writing these portions of the project, they may still consult with the other members of their group.
Student Instructions
Design Your Component
With your group you should have already identified and assigned the high-level functions that should be used to create your digital scene.
Do This:
Use the space here to design your functions. Once you're done you can share this project with your groupmates.
- How to Share Code with Teammates
- 3
Teaching Tip
Recombine Code
Students will need some way of recombining their code. Possible solutions are:
- emailing links to their individual code
- creating a shared document / spreadsheet into which students can paste links
Student Instructions
How To: Share Code with Teammates
Now that you have created your functions for the Digital Scene you need to share them with your teammates. To share your code follow the steps below.
1) Click the "Share" button at the top left corner of the level.
2) A window like the one below will open up. Copy the link in the box and give it to your teammates. Two possible ways to share would be to write down the URL or email the link to your teammates.
How To: Look at Shared Code
1) Open the link that your teammate share with you. You will end up at a page that looks like:
2) Click on "Built on Code Studio" button at the bottom of the App.
3) Click "How It Works" to open up the code.
4) The code that opens up will be "View Only". To get your own version of their code that you can copy parts of click on the "Remix" button at the top of the window.
5) The easiest way to copy code between projects will be in Text Mode. Switch both projects to Text Mode and copy the code from one to the other.
- Challenge: Design Your Digital Scene
- 4
Teaching Tip
- Students will use the functions they and their group members wrote to design their digital scenes.
- They are allowed to make some edits to their group members’ code if they wish, but they should be using code from each of their group members.
Student Instructions
Design Your Digital Scene
This is the final project that you will submit.
Do This:
Copy all of the individual functions you and your group members have written at the bottom of this program.
Design your scene using these functions, placing your calls at the top of the file.
Standards Alignment
View full course alignment
CSTA K-12 Computer Science Standards (2011)
CL - Collaboration
- CL.L2:3 - Collaborate with peers, experts and others using collaborative practices such as pair programming, working in project teams and participating in-group active learning activities.
CPP - Computing Practice & Programming
- CPP.L2:5 - Implement problem solutions using a programming language, including: looping behavior, conditional statements, logic, expressions, variables and functions.
- CPP.L3A:3 - Use various debugging and testing methods to ensure program correctness (e.g., test cases, unit testing, white box, black box, integration testing)
- CPP.L3A:4 - Apply analysis, design, and implementation techniques to solve problems (e.g., use one or more software lifecycle models).
CT - Computational Thinking
- CT.L2:12 - Use abstraction to decompose a problem into sub problems.
- CT.L2:6 - Describe and analyze a sequence of instructions being followed (e.g., describe a character’s behavior in a video game as driven by rules and algorithms).
- CT.L3A:1 - Use predefined functions and parameters, classes and methods to divide a complex problem into simpler parts.
- CT.L3A:3 - Explain how sequence, selection, iteration, and recursion are building blocks of algorithms.
- CT.L3B:4 - Evaluate algorithms by their efficiency, correctness, and clarity.
Computer Science Principles
2.2 - Multiple levels of abstraction are used to write programs or create other computational artifacts
2.2.1 - Develop an abstraction when writing a program or creating other computational artifacts. [P2]
- 2.2.1C - An abstraction generalizes functionality with input parameters that allow software reuse.
2.2.2 - Use multiple levels of abstraction to write programs. [P3]
- 2.2.2A - Software is developed using multiple levels of abstractions, such as constants, expressions, statements, procedures, and libraries.
- 2.2.2B - Being aware of and using multiple levels of abstraction in developing programs helps to more effectively apply available resources and tools to solve problems.
2.2.3 - Identify multiple levels of abstractions that are used when writing programs. [P3]
- 2.2.3A - Different programming languages offer different levels of abstraction.
- 2.2.3B - High level programming languages provide more abstractions for the programmer and make it easier for people to read and write a program.
4.1 - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
4.1.1 - Develop an algorithm for implementation in a program. [P2]
- 4.1.1D - Iteration is the repetition of part of an algorithm until a condition is met or for a specified number of times.
5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
5.1.2 - Develop a correct program to solve problems. [P2]
- 5.1.2B - Developing correct program components and then combining them helps in creating correct programs.
- 5.1.2C - Incrementally adding tested program segments to correct, working programs helps create large correct programs.
5.1.3 - Collaborate to develop a program. [P6]
- 5.1.3A - Collaboration can decrease the size and complexity of tasks required of individual programmers.
- 5.1.3B - Collaboration facilitates multiple perspectives in developing ideas for solving problems by programming.
- 5.1.3C - Collaboration in the iterative development of a program requires different skills than developing a program alone.
- 5.1.3D - Collaboration can make it easier to find and correct errors when developing programs.
- 5.1.3E - Collaboration facilitates developing program components independently.
- 5.1.3F - Effective communication between participants is required for successful collaboration when developing programs.
5.3 - Programming is facilitated by appropriate abstractions.
5.3.1 - Use abstraction to manage complexity in programs. [P3]
- 5.3.1A - Procedures are reusable programming abstractions.
- 5.3.1C - Procedures reduce the complexity of writing and maintaining programs.
- 5.3.1D - Procedures have names and may have parameters and return values.
- 5.3.1F - Parameters generalize a solution by allowing a function to be used instead of duplicated code
- 5.3.1G - Parameters provide different values as input to procedures when they are called in a program.
- 5.3.1L - Using lists and procedures as abstractions in programming can result in programs that are easier to develop and maintain.
5.4 - Programs are developed, maintained, and used by people for different purposes.
5.4.1 - Evaluate the correctness of a program. [P4]
- 5.4.1C - Meaningful names for variables and procedures help people better understand programs.
- 5.4.1D - Longer code blocks are harder to reason about than shorter code blocks in a program.
- 5.4.1E - Locating and correcting errors in a program is called debugging the program.
- 5.4.1F - Knowledge of what a program is supposed to do is required in order to find most program errors.
- 5.4.1G - Examples of intended behavior on specific inputs help people understand what a program is supposed to do.
- 5.4.1H - Visual displays (or different modalities) of program state can help in finding errors.
- 5.4.1I - Programmers justify and explain a program’s correctness.
- 5.4.1J - Justification can include a written explanation about how a program meets its specifications.
- 5.4.1K - Correctness of a program depends on correctness of program components, including code blocks and procedures.
CSTA K-12 Computer Science Standards (2017)
AP - Algorithms & Programming
- 2-AP-18 - Distribute tasks and maintain a project timeline when collaboratively developing computational artifacts.
- 3A-AP-17 - Decompose problems into smaller components through systematic analysis, using constructs such as procedures, modules, and/or objects.
- 3A-AP-18 - Create artifacts by using procedures within a program, combinations of data and procedures, or independent but interrelated programs.
- 3A-AP-22 - Design and develop computational artifacts working in team roles using collaborative tools.
- 3B-AP-14 - Construct solutions to problems using student-created components, such as procedures, modules and/or objects.
IC - Impacts of Computing
- 3A-IC-27 - Use tools and methods for collaboration on a project to increase connectivity of people in different cultures and career fields.