Skip to content
Marlbridge

AP® Computer Science A · Unit 1 · Topic 1.6

Compound Assignment Operators: Checklist (Computer Science A 1.6)

A self-check list for compound assignment operators and the post-increment and post-decrement operators, linked to the study guide sections and practice questions.

Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.

Understanding

  • I can say what each of +=, -=, *=, /= and %= does. (Guide: the table in “Updating a variable from its own value”; Practice Question 1)
  • I can say what ++ and -- do and that this course uses them after the variable, as statements. (Guide: “Adding and subtracting 1”; Practice Question 3)
  • I can explain that the whole right side of a compound assignment is evaluated before it is combined with the variable. (Guide: the bracket note; Practice Questions 2 and 5)
  • I can explain how the variable’s type affects /=. (Guide: “Tracing a sequence”; Practice Questions 4 and 6)

Skills

  • I can rewrite a compound assignment as an ordinary assignment with brackets around the right side. (Guide: the table; Practice Question 5)
  • I can trace a sequence of compound assignments in a table, using the value left by the previous statement. (Guide: Worked example 1; Practice Question 7)
  • I can use compound assignment to accumulate a total, apply a multiplier and share it out. (Guide: Worked example 2)
  • I can split a quantity into parts using / and %=. (Guide: Worked example 2; Practice Question 8)

Reasoning

  • I can explain why x =+ 5 is not the same as x += 5. (Guide: “Common misconceptions”)
  • I can explain why n *= 1.5 compiles for an int variable while n = n * 1.5 does not, and what value results. (Guide: “A detail to notice”; Practice Question 9)
  • I can say why money is better kept as an int number of pence when using integer division and the remainder. (Guide: Worked example 2)

All ticked? Move on to the Topic 1.7 study guide, Application Program Interface (API) and Libraries, or return to the course roadmap.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.