Lesson 12: Project - Decision Maker App
135 minutes
Overview
Using a Project Planning Guide, students work through the stages of creating an app from scratch.
- On Day 1, students complete the planning phase.
- On Day 2, students translate the plans they documented in Part 1 of the Practice PT to a working program in App Lab through a series of steps.
- On Day 3, students work with classmates to review and update the functionality of their apps before submitting the final project.
Standards
AP - Algorithms & Programming
- 2-AP-10 - Use flowcharts and/or pseudocode to address complex problems as algorithms.
- 2-AP-11 - Create clearly named variables that represent different data types and perform operations on their values.
- 3A-AP-16 - Design and iteratively develop computational artifacts for practical intent, personal expression, or to address a societal issue by using events to initiate instructions.
- 3B-AP-14 - Construct solutions to problems using student-created components, such as procedures, modules and/or objects.
Agenda
Objectives
Students will be able to:
- See rubric for guidance in measuring student learning
Preparation
- Review the project guide and make sure students have access to copies
- Check the "Teacher's Lounge" forum for verified teachers to find additional strategies or resources shared by fellow teachers
- If you're teaching virtual, consider checking out our Virtual Modifications for Day 1, Day 2, and Day 3
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the teachers
- CSP Bingo Cards - Unit Four - Handout (Download)
- CSP Bingo Generator - Resource
- Project - Decision Maker App - Slides
- Writing Support - Unit 4 Project - Decision Maker App - Handout
For the students
Teaching Guide
Day 1 (45 minutes)
Warm Up (5 minutes)
Intro the Project
Short Intro: The Warm Up today is short and light. Students should spend the maximum amount of time working on their projects.
Remarks
Have you ever been stuck trying to make a decision? What movie should we watch? Where should we go for lunch? How many chocolate bars can I buy? For the next three days you will build an app to help people make a decision.
Activity (40 minutes)
Plan the Decision Maker App
Level 1-2 - Explore: Have students explore the two sample apps in levels 1 and 2. These apps should spark ideas in what the students can create for this project.
Sample App #1: Where Should I Eat?
- Recommends a restaurant to the user.
- Expected User: Someone looking for a place to eat.
- Inputs: text box for user name, drop down menu for restaurant type, up and down buttons to control the amount of dollars the user wants to spend.
- Outputs: Text box at the bottom of the screen which displays the recommendation and sound that plays when the user interacts with the app.
- Variables: username, type of restaurant, dollar amount, output text
- Conditional Logic: If the dollar amount within certain amounts, recommend different restaurants
- Function: Update the screen every time the user changes an input.
Sample App #2: Activity Finder
- Recommends an activity to the user.
- Expected User: Someone who is looking for an activity.
- Inputs: text box for user name, drop down menu for time of day, drop down menu for activity level.
- Outputs: Text box at the bottom of the screen which displays the recommendation and sound that plays when the user interacts with the app.
- Variables: username, time of day, activity level, output text
- Conditional Logic: If the user selects certain times of day and activity levels, make targeted recommendations.
- Function: Update the screen every time the user changes an input.
Discuss: For each app, discuss the following:
- What does this app do?
- Who is an expected user for this app?
- What are the inputs?
- What are the outputs?
- What variables do you think would be necessary for this app to work?
- What kinds of conditional logic do you think are necessary to make it work?
- How could a function be used in this app?
Distribute: Each student should have a copy of the Practice PT Decision Maker App Planning Guide.
Remarks
For this project you will create an app that helps a user make a decision. Your app must take in at least one number and one string from the user that will help to make the decision. All of this information will be used as part of the decision making process. In addition, your code must include at least one function used to update the screen.
Review the app requirements in the Planning Guide.
Supporting students in Practice PT Lessons
The teacher plays the role of a guide throughout the Practice PT lessons. In preparation, you may want to set aside some time to complete the project yourself to identify potential points of confusion for your classroom.
In this first lesson, the classroom progresses together through steps 1-3, and then students work at the own pace for steps 4-6. Circulate the room and check in with students as needed to make sure instructions are clear and students understand expectations.
What should you expect?
- Students writing and sketching in the Planning Guide
- Active discussion around project ideas
- Students should only be on Code Studio if they have finished Steps 1-6 early and are ready to work in Design Mode in App Lab. If this is true, they can move on to the first level in Lesson 13.
Display: Show the steps students will complete today in the Planning Guide.
Step 1: Brainstorm App Ideas
- Students come up with three distinct ideas
Step 2: Choose one Idea
Step 3: Survey Your Classmates
- Students discuss with two classmates the decision their app will help the user make and decide what information is needed to make this decision.
Step 4: Storing Information
- Variables needed for storing information are listed in this section.
Step 5: Flowchart
- Students create a flowchart, following the "Can I adopt a cat?" sample flowchart from the Conditionals Explore lesson.
Step 6: Design User Interface
- There is space for students to design up to three screens. There are no screen requirements for the app, so students may use only one screen.
Wrap Up
No wrap up today. All time should be spent on the project.
Day 2 (45 minutes)
Warm Up
Remarks
Today we are continuing work on the Decision Maker App. Each level in Code Studio contains a step to think through while constructing your app.
Short Intro: The Warm Up today is short and light. Students should spend the maximum amount of time working on their projects.
Activity (40 minutes)
Build the Decision Maker App
Supporting students in Practice PT Lessons
At this point in the project attention shifts to App Lab where students design and program their app. Continue to circulate the room and check in with students as needed to make sure instructions are clear and students understand expectations.
What should you expect?
- Planning Guides out on desks or tables so students can reference them while setting up their apps
- A healthy buzz in the classroom as students collaboratively debug
- There may be some student confusion on the steps to take in building their app. Direct students back to the instructions, and make sure they haven't skipped any of the levels where the steps are delineated.
Do This: Students now transition to Code Studio where they will build their app.
Display: Display the steps for today along with the debugging steps on the board while students work.
Level 3: Design Mode
- Students create the screens they designed in Step 6 in the Planning Guide.
- Encourage students to use templates where appropriate to speed the process along.
Level 4: Create the Variables
- Using the list of variables from Step 4 in the Planning Guide students create their variables.
Level 5: Create the Function
- This is most likely the trickiest step.
- Students create an
updateScreen()
function with a conditional statement - Students should reference the flowchart in Step 5 of the Planning Guide to help craft the Boolean expression(s) for the conditional statement.
- A comment is added to explain what it does (purpose) and how it does that (functionality)
Level 6: Add onEvents
- For each item that can be interacted with on the screen, students add an
onEvent
block where they update the appropriate variable and add a call to theupdateScreen()
function.
Wrap Up (5 minutes)
Remarks
Now that we are near the end of the unit, we are going to play CSP Vocabulary BINGO once again. You have been working hard on learning the definitions of all of the different vocabulary words throughout the unit, and now we will put your amazing memories to the test.
I will give each of your a BINGO card that has randomized vocabulary on it. When you hear the definition for a word that you have on your card, mark that square. If you have 4 in a row horizontally, vertically, or diagonally, yell, "BINGO!"
Are there any questions?
Do This: Pass out a BINGO Card to all students. A printable PDF is located in the Resources section of this lesson plan.
Do This: Use the CSP Bingo Generator for Unit Four in order to generate clues for the students.
Day 3 (45 minutes)
Warm Up (2 minutes)
Remarks
For the past few days we've been working on an app to help users make a decision. Now you will share that app with others, get feedback, make improvements, and submit for your final project.
Short Intro: The Warm Up today is short and light. Students should spend the maximum amount of time working on their projects.
Activity (33 minutes)
Test the Decision Maker App
Supporting students in Practice PT Lessons
This is the final lesson where students complete their projects. The classroom energy will likely increase when students begin Step 8 and collect feedback from classmates. Encourage students to work productively during the testing phase so they have enough time to finish their projects.
What should you expect?
- It's ok to start the testing phase even if the apps aren't finished. Students should be able to explain to each other what they want their app to do when fully operational.
- Students should have their Planning Guides out again to record feedback and plans for implementing changes
- Frustration may be higher today if students feel rushed to debug and fix their projects for final submission. Make sure students have debugging partners and are actively making use of their debugging skills.
- If students are inspired to continue working on their projects or add additional features, you may need to extend the project an extra day or allow students to work outside of class.
Group: Put students in groups of 3-4.
Do This: Direct students to Level 7 in Code Studio. They should pull out their Planning Guides and with their group complete Step 8: Testing.
Step 8: Testing
- Each app is tested by at least two students.
- The creator of the app watches these students use the app and records feedback from the testers and things the creator noticed while observing someone else using the app. For example, the creator may notice that the user has difficulty figuring out which button to click on the app to make it run. The creator notes this down in the Planning Guide.
Step 9: Pick Improvements
- In the Planning Guide, students pick at least one improvement that they can make based on feedback from their peers.
Step 10: Complete Your app
- Students use the feedback to update their app on Level 1.
Step 11: Record Video
- Students make a screen capture of their app being used.
Wrap Up (10 minutes)
Remarks
Congratulations! You built an app completely from scratch.
Do This: Complete the written responses in Step 12 of the Project Guide.
-
Question 1: Your program includes a conditional statement that makes a decision based on certain criteria. Explain how the program determines which block of code to execute. What are the possible outcomes of this conditional statement, and how do they affect the program?
-
Question 2: Consider a procedure in your program that performs a specific task. Explain how this procedure helps manage the complexity of your program. Describe how using this procedure improves the organization of your code and makes it easier to modify or extend.
Each student, in every classroom, will come to the written response with a different level of comfort, ability, and familiarity with writing for these style of questions. As such, consider offering one or more of the following supports:
Writing Support: Provide students with these sentence starters for guiding their response.
App Interface Support: For students who did not fully complete their app, direct them to the completed app in Level 1 in order to respond to the question
Assessment: Practice PT Decision Maker Project
Use the CSP U4 Practice PT Rubric provided with the project to assess student work.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.