Please enable JavaScript to use CodeHS

AP Computer Science A (Nitro)

Description

In this lesson, students will be introduced to and practice using the Java main skeleton that includes the class and main method arguments. They will use the System.out.print and System.out.println commands to print string literals in the editor. This lesson corresponds with AP Computer Science A topic 1.1.

Objective

Students will be able to:

  • call system class methods to generate output to the console
  • recognize the difference between display behavior of System.out.print and System.out.println
  • create string literals
Description

In this lesson, students will learn about variables. Variables allow information to be stored such as numbers, words, or true/false expressions. A variable can be thought of as a box that stores information inside. In Java, variables are composed of three things: a name, type, and value. This lesson corresponds with AP Computer Science A topic 1.2.

Objective

Students will be able to:

  • declare, initialize and assign a value to a variable
  • identify the most appropriate data type category for a particular specification
  • categorize a data type as either primitive or reference
  • declare a final variable
Description

In this lesson, students learn how to use arithmetic expressions in Java. Arithmetic expressions allow the use of mathematical operations within Java. Students will also learn about the modulus operator (%) and how it is evaluated. Such expressions can be used for basic math and even more complex algorithms. This lesson corresponds with AP Computer Science A topic 1.3.

Objective

Students will be able to:

  • evaluate arithmetic expressions in a program code
  • use the modulus operator (%)
Description

In this lesson, students will learn how to use the increment operator (++), the decrement operator (--) and compound assignment operators (+=, −=, *=, /=, %=). The increment operator (++) and decrement operator (−−) are used to add 1 or subtract 1 from the stored value of a variable. The new value is assigned to the variable. This lesson corresponds with AP Computer Science A topic 1.4.

Objective

Students will be able to:

  • Evaluate what is stored in a variable as a result of an expression with an assignment statement
  • Use a compound assignment operators (+=, −=, *=, /=, %=) in place of the assignment operator
  • Use an increment operator (++) or decrement operator (−−) to add 1 or subtract 1 from the stored value of a variable
Description

In this lesson, students will learn how to receive user input with the Scanner class in Java. After creating a new Scanner object, they will learn the commands below that will allow them to take in data from the user.

String name = input.nextLine();
int number = input.nextInt();
double decimal = input.nextDouble();
Objective

Students will be able to:

  • import and initialize a new Scanner to take in user input
  • create variables that take the assigned value of the user input.
  • choose the correct command that will allow the program to receive the input value that corresponds with its desired data type

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU (Var-1) To find specific solutions to generalizable problems, programmers include variables in their code so that the same algorithm runs using different input values. (LOs 1.A, 1.B)
Description

In this lesson, students will learn how to change the data type of a value through the process of casting. They will also use casting to help round double values to the closest integer value. Students will explore the range of variables allowed in Java and understand integer overflow when a value outside of this range is attempted. This lesson corresponds with AP Computer Science A topic 1.5.

Objective

Students will be able to:

  • Evaluate arithmetic expressions that use casting
  • Understand that integer values in Java are stored using a finite amount (4 bytes) of memory. Therefore, an int value must be in the range from Integer.MIN_VALUE to Integer.MAX_ VALUE inclusive
  • Understand when an expression evaluates to an int value outside of the allowed range, an integer overflow occurs
  • Recognize and use implicit casting
  • Use casting to round to the nearest integer
Description

In this lesson, students are introduced to classes and objects. These are the foundations of object oriented programming.
Students will learn about objects that have state and behavior, and classes which are the templates for creating objects. This lesson corresponds with AP Computer Science A topic 2.1.

Objective

Students will be able to:

  • Explain the relationship between a class and an object
  • Create classes with instance variables
Description

In this lesson, students will create and use constructors. The constructor, or signature of a class, allows for the creation of a new object. Students will create objects by calling constructors with parameters. Parameters are values that are passed into a constructor. These are referred to as actual parameters. This lesson corresponds with AP Computer Science A topic 2.2.

Objective

Students will be able to:

  • Create and use constructors
  • Create objects by calling constructors with parameters
Description

In this lesson, students are introduced to method overloading. This is when several different methods are written, each with the same name. As long as each method’s parameter list is different, the same method name can be used multiple times! This lesson corresponds with AP Computer Science A topic 2.2.

Objective

Students will be able to:

  • Explain the purpose of method overloading
  • Create classes that overload methods
  • Explain how null objects do not point to any particular object data
  • Create programs that use other classes as a client to solve a specific problem
Description

In this lesson, students will take a deeper look into creating and calling the methods of a class. Methods are procedures that define and allow for control of the behavior of an object. Once an object is instantiated, the instance variables can be used across the different methods that are created. Students will also learn about procedural abstraction for methods that can be used without knowing all of the underlying details and code. This lesson corresponds with AP Computer Science A topic 2.3.

Objective

Students will be able to:

  • Create and call class methods
  • Call non-static void methods without parameters
Description

In this lesson, students will build on what they have learned and discover how to call a void method with parameters. Just as constructors can have parameter values, methods can have formal parameters that affect the state of the object as well. Methods can also be overloaded just like constructors! This lesson corresponds with AP Computer Science A topic 2.4.

Objective

Students will be able to:

  • Call non-static void methods with parameters
Description

In this lesson, students will learn how to call a non-void method and return a value from a method by using the keyword return. The return keyword returns a variable or value back to the existing program so it can be used further along in the program. This lesson corresponds with AP Computer Science A topic 2.5.

Objective

Students will be able to:

  • Create and call non-void methods with parameters and return values
Description

In this lesson, students will learn about the immutability of Strings as objects. Once a String object is created, it cannot be changed or manipulated. The only way to change a String value is to reassign the variable with a different String value. Students will also practice String concatenation using operators such as + and += and use escape sequences such as \” and \n. This lesson corresponds with AP Computer Science A topic 2.6.

Objective

Students will be able to:

  • Create String objects for a String class
  • Concatenate Strings using operators and escape sequences
Description

In this lesson, students will look at Strings as a sequence of characters and utilize String methods from the java.lang package. Students will learn about packages, libraries and documentation. The following String methods will be examined in this lesson:

name.length() 
name.substring(2, 6)
name.indexOf(“d”)
name.equals(“Karel”)
name.compareTo(“Karel”)

This lesson corresponds with AP Computer Science A topic 2.7.

Objective

Students will be able to:

  • Call String methods for a String class
  • Explain the importance of APIs, documentation and packages in Java

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Var-1 To find specific solutions to generalizable problems, programmers include variables in their code so that the same algorithm runs using different input values. (LO’s 1.E, 1.D)
  • EU Mod-1 Some objects or concepts are so frequently represented that programmers can draw upon existing code that has already been tested, enabling them to write solutions more quickly and with a greater degree of confidence. (LO’s 1.G, 1.F, 1.C)
Description

In this lesson, students will learn how to convert primitive types to object types using a wrapper class. They will learn how Java automatically converts types using autoboxing and unboxing. This lesson corresponds with AP Computer Science A topic 2.8.

Objective

Students will be able to:

  • Create Integer and Double objects for wrapper classes
  • Call Integer and Double methods for wrapper classes
Description

In this lesson, students will learn about static methods. Static methods are methods that can be called without creating an object. More specifically, students will discover and practice using static methods in the Java Math class. The following Math class methods will be examined in this lesson:

Math.abs(x)
Math.pow(base, exponent)
Math.sqrt(x)
Math.random()
Math.round()
Math.cos()
Math.sin()
Math.PI

This lesson corresponds with AP Computer Science A topic 2.9.

Objective

Students will be able to:

  • Call static methods
  • Evaluate expressions that use the Math class methods
Description

In this lesson, students will learn about Boolean expressions and relational operators. Relational Operators are constructs in programming that allow for the comparison of the values of two expressions. This lesson corresponds with AP Computer Science A topic 3.1.

Objective

Students will be able to:

  • Evaluate Boolean expressions that use relational operators in program code
Description

In this lesson, students will learn about control structures and if statements. If statements are used in programming when there are a set of statements that should be executed only when certain conditions are met. This lesson corresponds with AP Computer Science A topic 3.2.

Objective

Students will be able to:

  • Represent branching logical processes by using flowcharts
  • Use if statements
Description

In this lesson, students will expand their knowledge of control structures and learn about if/else statements. This lesson corresponds with AP Computer Science A topic 3.3.

Objective

Students will be able to:

  • Use if/else statements
Description

In this lesson, students will take control structures a step further and learn how to implement a statement with an else if condition. This lesson corresponds with AP Computer Science A topic 3.4.

Objective

Students will be able to:

  • Use an else if statement

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-1 The way variables and operators are sequenced and combined in an expression determines the computed result. (LO’s 1.E)
  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.A)
Description

In this lesson, students will determine the truth value of compound Boolean expressions. They will also examine short circuit evaluation and nested if statements. This lesson corresponds with AP Computer Science A topic 3.5.

Objective

Students will be able to:

  • Evaluate compound Boolean expressions in program code
Description

In this lesson, students will examine De Morgan’s laws and determine when compound Boolean expressions are equivalent. They will use truth tables to display equivalent Boolean expressions. This lesson corresponds with AP Computer Science A topic 3.6.

Objective

Students will be able to:

  • Compare and contrast equivalent Boolean expressions
  • Apply De Morgan’s Laws to Boolean expressions
Description

In this lesson, students will learn the different ways of comparing objects and how it is different than comparing primitive types. With objects, because the variable is pointing to a location, the use of == is not possible, as the memory address is being compared between objects, not the actual values. Students will discover and use the .equals method. This lesson corresponds with AP Computer Science A topic 3.7.

Objective

Students will be able to:

  • Compare object references using Boolean expressions in program code
Description

In this lesson, students will learn how and when to use a while loop. Repetitive code can be avoided by using a while loop. While loops are used to repeat a set of statements until a condition is met. This lesson corresponds with AP Computer Science A topic 4.1.

Objective

Students will be able to:

  • Represent iterative processes using a while loop
  • Execute a return or break statement inside an iteration statement to halt the loop and exit the method or constructor
  • Develop an algorithm
  • Identify if an integer is or is not evenly divisible by another integer
  • Determine a minimum or maximum value
  • Compute a sum, average, or mode
Description

In this lesson. students learn how to use for loops in their programs. The for loop allows students to repeat a specific part of code a fixed number of times.

For loops are written like this:

for(int i = 0; i < 4; i++)
{
    // Code to be repeated 4 times
}

This lesson corresponds with AP Computer Science A topic 4.2.

Objective

Students will be able to:

  • Represent iterative processes using a for loop
Description

In this lesson, students will learn how to develop algorithms using Strings. Students will traverse Strings using a for loop and the print.length() command.

for(int i = 0; i < string.length(); i++)
{
    String character = string.substring(i, i+1);
}

This lesson corresponds with AP Computer Science A topic 4.3.

Objective

Students will be able to:

  • Develop an algorithm using Strings
  • Find if one or more substrings has a particular property
  • Determine the number of substrings that meet specific criteria
  • Create a new string with the characters reversed
Description

In this lesson, students will learn about nested loops. Nested loops are when loops are placed inside other loops to create more complex programs. When a loop is nested inside another loop, the inner loop must complete all its iterations before the outer loop can continue. This lesson corresponds with AP Computer Science A topic 4.4.

Objective

Students will be able to:

  • Represent nested iterative processes

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.C, 2.D, 2.E, 2.F, 2.G)
Description

In this lesson, students will examine the concept of informal code analysis. This includes an algorithm’s correctness, efficiency and the ability to be understood. This lesson corresponds with AP Computer Science A topic 4.5.

Objective

Students will be able to:

  • Compute statement execution counts of iterative statements
  • Compute informal run-time comparison of iterative statements
Description

In this lesson, students will explore and learn the anatomy of classes. They will take a deeper dive into what the access specifier does, and how it can be used within programs to make data public or private. Students will learn about encapsulation and the responsibility programmers have to choose whether data should be accessible, modifiable, both or neither. This lesson corresponds with AP Computer Science A topic 5.1.

Objective

Students will be able to:

  • Designate access and visibility constraints to classes, data, constructors, and methods
  • Designate private visibility of instance variables to encapsulate the attributes of an object
Description

In this lesson, students will expand their knowledge of constructors. They will create constructors that take objects as a formal parameter. This lesson corresponds with AP Computer Science A topic 5.2.

Objective

Students will be able to:

  • Define instance variables for the attributes to be initialized through the constructors of a class
Description

In this lesson, students will learn how to document their programs using comments. Comments are important to programming because they allow others to easily interpret and use the program code correctly. They can also be used as a debugging tool. This lesson corresponds with AP Computer Science A topic 5.3.

Objective

Students will be able to:

  • Describe the functionality and use of program code through comments
Description

In this lesson, students will examine accessor methods in more detail. This lesson corresponds with AP Computer Science A topic 5.4.

Objective

Students will be able to:

  • Define behaviors of an object through non-void methods without parameters written in a class
Description

In this lesson, students will examine mutator methods in more detail. Mutator methods are often void methods used to change the value of instance and static variables. This lesson corresponds with AP Computer Science A topic 5.5.

Objective

Students will be able to:

  • Define behaviors of an object through void methods with or without parameters written in a class
Description

In this lesson, students will examine writing classes in more detail. It is a good programming practice to avoid altering objects within methods unless the method specifically calls for alterations to the object. Accessor and getter methods make obvious changes to objects, but most methods should not attempt to make changes unless it’s explicitly necessary. This lesson corresponds with AP Computer Science A topic 5.6.

Objective

Students will be able to:

  • Discuss changes to both primitive and reference formal parameters in methods
Description

In this lesson, students will take a deeper look at static variables and methods. Static variables belong to the class, and all objects of a class share a single static variable. This lesson corresponds with AP Computer Science A topic 5.7.

Objective

Students will be able to:

  • Define behaviors of a class through static methods
  • Define the static variables that belong to the class.

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Mod-2 Programmers use code to represent a physical object or nonphysical concept, real or imagined, by defining a class based on the attributes and/or behaviors of the object or concept. (LO’s 2.A, 2.B, 2.C, 2.D, 2.E, 2.F, 2.G)

  • EU Mod-3 When multiple classes contain common attributes and behaviors, programmers create a new class containing the shared attributes and behaviors forming a hierarchy. Modifications made at the highest level of the hierarchy apply to the subclasses. (LO’s 3.A)

Description

In this lesson, students will learn about scope and access. The placement of a variable within a program affects the scope of the variable, meaning where it can be used and accessed in a program. Students will learn how to avoid scope and access errors by using method decomposition. This lesson corresponds with AP Computer Science A topic 5.8.

Objective

Students will be able to:

  • Explain where variables can be used in the program code
Description

In this lesson, students will learn how the this keyword can be used in programs. The keyword this is a reference to the current object whose methods and constructors are being called. This lesson corresponds with AP Computer Science A topic 5.9.

Objective

Students will be able to:

  • Evaluate object reference expressions that use the keyword this
Description

In this lesson, students will explore several areas related to the ethical and societal implications of computing systems. This includes the professional computing code of ethics, system reliability, legal issues and intellectual property concerns, and bias in computing. This lesson corresponds with AP Computer Science A topic 5.10.

Objective

Students will be able to:

  • Explain the ethical and social implications of computing systems
Description

In this lesson, students will learn about and create arrays. The use of array objects allows multiple related items to be represented using a single variable. This lesson corresponds with AP Computer Science A topic 6.1.

Objective

Students will be able to:

  • Represent collections of related primitive or object reference data using one-dimensional (1D) array objects
Description

In this lesson, students will learn how to traverse arrays. Iteration statements can be used to access all the elements in an array. This is called traversing the array. This lesson corresponds with AP Computer Science A topic 6.2.

Objective

Students will be able to:

  • Traverse the elements in a 1D array
Description

In this lesson, students will take a look at enhanced loops. An enhanced for loop is an alternate method to traverse an array instead of using for or while loops. This lesson corresponds with AP Computer Science A topic 6.3.

Objective

Students will be able to:

  • Traverse the elements in a 1D array object using an enhanced for loop
Description

In this lesson, students will learn how arrays are used to develop algorithms. They will examine common techniques used in array analysis. This lesson corresponds with AP Computer Science A topic 6.4.

Objective

Students will be able to:

  • Recognize and identify common algorithms that utilize array traversals

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.I)

  • EU Var-2 To manage large amounts of data or complex relationships in data, programmers write code that groups the data together into a single data structure without creating individual variables for each value. (LO’s 2.A, 2.B, 2.C)

Description

In this lesson, students will learn about and use ArrayLists. ArrayLists are similar to arrays, except that they are a mutable list of object references. ArrayLists provide a convenient way to create adjustable arrays. This lesson corresponds with AP Computer Science A topic 7.1.

Objective

Students will be able to:

  • Represent collections of related object reference data using ArrayList objects
Description

In this lesson, students will learn and use methods that allow the state of ArrayLists to be altered. These methods are as follows:

  • boolean add(E obj)
  • void add(int index, E obj)
  • E get(int index)
  • int size()
  • E set(int index, E obj)
  • E remove(int index)

This lesson corresponds with AP Computer Science A topic 7.2.

Objective

Students will be able to:

  • Use methods associated with ArrayLists
Description

In this lesson, students will learn how to traverse ArrayLists. For ArrayLists, instead of using .length and brackets ([]) to access the elements in a list, size() and get() will be used. This lesson corresponds with AP Computer Science A topic 7.3.

Objective

Students will be able to:

  • Traverse ArraysLists using a for or while loop
  • Access elements in an ArrayList using iteration statements
  • Remove elements in an ArrayList
Description

In this lesson, students will develop algorithms using ArrayLists. They will examine standard algorithms for removing and inserting elements while traversing an ArrayList. This lesson corresponds with AP Computer Science A topic 7.4.

Objective

Students will be able to:

  • Identify standard ArrayLists algorithms such as inserting and deleting elements
  • Modify standard ArrayLists algorithms
  • Develop an ArrayLists algorithm
Description

In this lesson, students will explore and analyze a linear search. Linear Search is an algorithm that searches data sets in a sequential order, checking each value from the 0th index to the end of the data set to see what index a specific element can be located at. This lesson corresponds with AP Computer Science A topic 7.5.

Objective

Students will be able to:

  • Apply linear search algorithms to search for specific information in array or ArrayList objects
Description

In this lesson, students will students will explore and analyze Selection Sort and Insertion Sort. Selection Sort swaps the minimum value left in an array with the current array index. Insertion Sort shifts the already sorted section of an array to place the current array value in the correct index. This lesson corresponds with AP Computer Science A topic 7.6.

Objective

Students will be able to:

  • Apply selection sort and insertion sort algorithms to sort the elements of array or ArrayList objects
  • Compute statement execution counts and informal run-time comparison of sorting algorithms

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.J, 2.K, 2.L, 2.M)

  • EU Var-2 To manage large amounts of data or complex relationships in data, programmers write code that groups the data together into a single data structure without creating individual variables for each value. (LO’s 2.D, 2.E)

Description

In this lesson, students will discuss the ethical issues around how and why data is collected. They will look at the risks to personal privacy when working on computer systems and the internet and discuss how computer programs can have beneficial and/or harmful impacts on personal security. Lastly, the importance that programmers have in terms of safeguarding personal privacy will be considered and emphasized. This lesson corresponds with AP Computer Science A topic 7.7.

Objective

Students will be able to:

  • Explain the risks to privacy from collecting and storing personal data on computer systems
  • Explain the role that programmers have considering safeguarding personal privacy
  • Explain the beneficial and harmful impacts that computer use and the creation of programs have on personal security
Description

In this lesson, students will explore and use 2D arrays. A 2D array is an array that stores arrays! This lesson corresponds with AP Computer Science A topic 8.1.

Objective

Students will be able to:

  • Represent collections of related primitive or object reference data using two-dimensional (2D) array objects
Description

In this lesson, students will extend their learning on 2D arrays by traversing through them. When attempting to access all elements in a 2D array, we can do so in two different ways. Row-major order traverses the 2D array by accessing each value in a row before moving to the next row and column-major order traverses each column down all rows before moving to the next column. This lesson corresponds with AP Computer Science A topic 8.2.

Objective

Students will be able to:

  • Traverse 2D arrays using nested for loops
  • Traverse 2D arrays using nested enhanced for loops

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.N)

  • EU Var-2 To manage large amounts of data or complex relationships in data, programmers write code that groups the data together into a single data structure without creating individual variables for each value. (LO’s 2.F, 2.G)

Description

In this lesson, students will learn about superclasses and subclasses. A superclass is a parent class that contains common attributes and behaviors used by subclasses (children). Subclasses can draw upon the existing attributes and behaviors of the superclass without repeating these in the code. This lesson corresponds with AP Computer Science A topic 9.1.

Objective

Students will be able to:

  • Create an inheritance relationship from a subclass to the superclass
Description

In this lesson, students will write constructors for subclasses. The superclass constructor can be called from the first line of a subclass constructor by using the keyword super and passing appropriate parameters. This lesson corresponds with AP Computer Science A topic 9.2.

Objective

Students will be able to:

  • Write constructors for subclasses
Description

In this lesson, students will learn how to override methods in a superclass/subclass relationship. Method overriding occurs when a public method in a subclass has the same method signature as a public method in the superclass. This lesson corresponds with AP Computer Science A topic 9.3.

Objective

Students will be able to:

  • Override a method in a superclass/subclass relationship
Description

In this lesson, students will use the super keyword. This keyword can be used to call a superclass’s constructors and methods even if the method has been overridden. This lesson corresponds with AP Computer Science A topic 9.4.

Objective

Students will be able to:

  • Use the super keyword to call a superclass’s constructors and methods
Description

In this lesson, students will create references using inheritance hierarchies. An object can take on different forms depending on its implementation. Java can call the correct method even when an object is disguised as a more generic reference type. This is known as polymorphism. This lesson corresponds with AP Computer Science A topic 9.5.

Objective

Students will be able to:

  • Define reference variables of a superclass to be assigned to an object of a subclass in the same hierarchy

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Mod-3 When multiple classes contain common attributes and behaviors, programmers create a new class containing the shared attributes and behaviors forming a hierarchy. Modifications made at the highest level of the hierarchy apply to the subclasses. (LO’s 3.B, 3.C)
Description

In this lesson, students will take a deeper dive into Polymorphism. At compile time, methods in or inherited by the declared type determine the correctness of a non-static method call. At run-time, the method in the actual object type is executed for a non-static method call. This lesson corresponds with AP Computer Science A topic 9.6.

Objective

Students will be able to:

  • Call methods in an inheritance relationship
Description

In this lesson, students will call and use the Object superclass. The Object class is the superclass of all other classes in Java. This lesson corresponds with AP Computer Science A topic 9.7.

Objective

Students will be able to:

  • Call Object class methods through inheritance
  • Utilize the Object class through inheritance
Description

In this lesson, students will learn about recursion and recursive methods. A recursive method is a method that calls itself. Recursive methods contain at least one base case, which halts the recursion, and at least one recursive call. This lesson corresponds with AP Computer Science A topic 10.1.

Objective

Students will be able to:

  • Determine the result of executing recursive methods

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.O)
Description

In this lesson, students will examine and apply recursive searching such as the binary search. The binary search algorithm starts at the middle of a sorted array or ArrayList and eliminates half of the array or ArrayList in each iteration until the desired value is found or all elements have been eliminated. This lesson corresponds with AP Computer Science A topic 10.2.

Objective

Students will be able to:

  • Apply recursive search algorithms to information in String, 1D array, or ArrayList objects
Description

In this lesson, students will use recursive methods to sort an array called Merge Sort. Merge sort is a recursive sorting algorithm that can be used to sort elements in an array or ArrayList. This lesson corresponds with AP Computer Science A topic 10.3.

Objective

Students will be able to:

  • Apply recursive algorithms to sort elements of an array or ArrayList objects