Please enable JavaScript to use CodeHS

AP Computer Science A (Cortado)

Lesson 2.6 Comparing Boolean Expressions

Description

In this lesson, students will explore how to simplify and transform Boolean expressions using De Morgan’s Laws and logical equivalence. They will also investigate how to compare object references and values in Java, with a focus on == vs .equals() for both custom objects and Strings.


Objective

Students will be able to:

  • Apply De Morgan’s Laws to transform boolean expressions
  • Identify and write logically equivalent boolean expressions
  • Use truth tables to evaluate logical equivalence
  • Compare object references and values using == and .equals()
  • Determine when objects are the same or merely equivalent in attributes