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.
Students will be able to:
System.out.print
and System.out.println
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.
Students will be able to:
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.
Students will be able to:
%
)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.
Students will be able to:
+=
, −=
, *=
, /=
, %=
) in place of the assignment operator++
) or decrement operator (−−
) to add 1 or subtract 1 from the stored value of a variableIn 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();
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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.
Students will be able to:
int
value must be in the range from Integer.MIN_VALUE
to Integer.MAX_ VALUE
inclusiveIn 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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
In this lesson, students will examine accessor methods in more detail. This lesson corresponds with AP Computer Science A topic 5.4.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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)
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.
Students will be able to:
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.
Students will be able to:
this
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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)
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.
Students will be able to:
In this lesson, students will learn and use methods that allow the state of ArrayLists to be altered. These methods are as follows:
This lesson corresponds with AP Computer Science A topic 7.2.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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)
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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)
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
super
keyword to call a superclass’s constructors and methodsIn 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.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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.
Students will be able to:
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.
Students will be able to:
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.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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.
Students will be able to:
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.
Students will be able to: