0% found this document useful (0 votes)
16 views

Unit 1 Lesson 5 Compound Assignment Operators Lesson Plan

Uploaded by

vandana.giri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Unit 1 Lesson 5 Compound Assignment Operators Lesson Plan

Uploaded by

vandana.giri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Lesson Plan

Lesson 1.5: Compound Assignment


Operators

Overview
This lesson introduces the concept of compound assignment operators and
corresponds to College Board AP CSA topic 1.4. Compound assignment
operators are shortcuts that do a math operation and assignment in one step.
Students will have the opportunity to manipulate compound assignment
operators and evaluate changes to an affected variable.

Note: If you wish to provide a URL/link for students to access this lesson, you
will need to replace “yourCustomCourseName” in the customized link below
with the name of your custom course that you created. For instructions on how to
set up a custom course, please see https://www.csawesome.org/runestone-e-book.

Customized Link to Share:


https://runestone.academy/ns/books/published/yourCustomCourseName/Unit1-
Getting-Started/topic-1-5-shortcutoperators.html

Student Learning Objectives


ENDURING UNDERSTANDINGS

CON-1 the way variables and operators are sequenced and combined in a expression
determines the computed result.

LEARNING OBJECTIVE ESSENTIAL KNOWLEDGE

CON-1.B Evaluate what is stored in a ➢ CON 1.B.4 Compound


variable as a result of an expression with assignments operators (+=, -=, *=,
an assignment statement. /=, %=) can be used in place of the
assignment operator

1
Lesson Plan
Lesson 1.5: Compound Assignment
Operators

➢ CON 1.B.5 The increment


operator (++) and decrement
operator (--) are used to add 1 and
subtract 1 from the stored value of
a variable or an array element. The
new value is assigned to the
variable or array element.

EXCLUSION STATEMENT -- (EK


CON-1.B.5): the use of increment and
decrement operators in prefix form (i.e., +
+x) and inside other expressions (i.e.,
arr[x++]) is outside the scope of the this
course and the AP Exam.

Materials and Resources

● Presentation system (LCD projector / Interactive whiteboard / Doc


Camera)
● 1.5 Compound Assignment Operators in the CSAwesome E-book
● Compound Assignment Operators Practice (paper and pencil activity)
● Compound Assignment Operators Practice Solutions
● Compound Assignment Operators Maze Activity
● Java Compound Assignment Operators (optional YouTube Video)
● CSAwesome! Programming Solutions

2
Lesson Plan
Lesson 1.5: Compound Assignment
Operators

Learning Activities
Tip: This lesson is meant to be done in pairs if possible. Teachers may assign pairs,
students may choose partners, however, students should not be forced to work with a
partner.

Estimated Length: 45 Minutes

● Hook/Motivation (5 mins):

○ Think - Pair - Share As a class, brainstorm some examples of how


people use shortcuts. Shortcuts for any purpose are acceptable for this
intro activity.
● Experiences and Explorations (35 mins):
○ Direct Instruction (5 Minutes): Put the Compound Assignment Operators
using the table in the lesson on the board / projection and give a brief
introduction of how they work. Assign a value to x and ask students what
the result of the shortcut operators would be. Stress the difference
between /= and %=.
○ Direct Instruction continued: Use the Code Lens button in Activity 1 in
the lesson to show the code visualizer and trace through the code step by
step.

○ Pair Programming (10 minutes): Have students work in pairs to come


up with more compound operator statements and have their partner guess
what it will print out before running it in Activity 1 of the e-book. Have
students work in pairs on the multiple choice exercises 1-5-1 and 1-5-2.

○ Pair Programming Challenge (10 minutes): Complete the Code


Tracing Challenge in the e-book in pairs

3
Lesson Plan
Lesson 1.5: Compound Assignment
Operators

○ Small Group Activity (10 minutes): Have students work with an


elbow partner on the Lesson 1.5 Compound Assignment Operator Maze
Activity to determine a path that will provide the greatest possible value.
Due to the great number of possible paths, student possible responses are
many, and no answer key is provided. Teachers should accept all
reasonable values. All values at the END location will be a value in this
range -9 <= x <=9. Teachers should look for evidence of student
misunderstanding.

○ Lesson 1.5 Practice Sheet Have students complete the practice sheet
then compare answers with their elbow partners. Teachers may elect to
provide an answer key for checking. This could be assigned as homework
if there is no time to complete it in class.
○ Rethink, Reflect, and/or Revise (5 mins):
■ Wrap up Discussion: Compare results from the Operator Maze
activity. Solicit student questions and answer as needed.

Check for Understanding


● Interactive Exercises: 1-5-1 and 1-5-2
● Coding Exercises: Activity 1, Code Tracing Challenge
● Common Misconceptions:
○ It is quite common for students to be confused by /= (integer division) and
%= (remainder division). Reminding students about elementary grades
division of 3 divides into 14 a whole number of 4 times (integer division)
with a remainder of 2 (remainder division) may help their understanding
of the two operations.

4
Lesson Plan
Lesson 1.5: Compound Assignment
Operators

● Personal Progress Check (College Board): The College Board AP Classroom


provides a quiz bank and Personal Progress Checks. You may create a formative
assessment quiz for topic 1.4 in the AP Classroom. Review the results in class to
identify and address any student misunderstandings.

Differentiation: More Practice


● You may have students complete similar problems to the worksheets..

Differentiation: Enrichment

● GeeksforGeeks.org provide a table of all 11 compound assignment


operators used in Java including left and right formating.
● Meritcampus provides online practice in the use of compound assignment
operators.
● Java modulus operator provides % remainder division practice

Background Knowledge

The following link provides a good explanation of compound assignment


operators, Java Compound Operators - w3schools Tutorial

5
Lesson Plan
Lesson 1.5: Compound Assignment
Operators

Teaching Tips
● CSP → CS A Tips
○ Students will mostly have learned an incremental assignment operator in a
looping structure such as counter = counter +1, or counter++. This lesson
expands on this concept.
● General Teaching Tips
○ The key to this lesson is to keep it simple. We are focusing on the basic
concept of changing the value and restoring that value back into the
variable.
○ When students do the practice and hands-on activity, they should be
allowed to use a calculator if they wish. The objective is to understand
how the computer evaluates the mathematical changes and maintains a
running value of a variable. Students should not be evaluated on their own
math skills.

Teacher Professional Development Reflection

After reviewing this lesson plan in the professional development, complete the form
found here to provide feedback on the lesson, materials provided, etc.

Attributions

You might also like