AP Computer Science A
AP Computer Science A (Java)
Into to
Computers
and
Computer Programs
:
Introduction to the "computer" as a
programmable
computing device
Overview on how a computer works:
The computer memory and the binary number system
Introduction of
computer program/algorithm
:
What
does a
computer program
contain?:
The process of writing computer programs
--- what is going on behind the scenes
Installing the
BlueJ
Integrated Development Environment:
Introduction to Java programming
Hello.java - Everyone's first Java program:
How to compile and run a Java program with
BleuJ
(demo interactively):
Chapter 2: Elementary Programming
Writing a simple Java program that compute area of a circle:
Java input and output:
Defining variables, Identifiers and Primitive data types (include boolean):
Arithmetic operations
and
short hand
operators:
Assign homework 1:
Mixed
data type operations:
Named
constants
and naming convention:
Misc topics:
(1) cascaded assignment, (2) swap variables
Chapter 3: Selections
Conditions
,
boolean
data type,
boolean
variables and
boolean
expressions:
if
-statements: (1)
one-way
if-statement and (2)
one-way
if-statement
Advanced
if
-statements: (1)
nested
if-statement and (2)
multi-way
if-statement
Assign homework 2:
Some
common errors
made with
if
-statements:
Generating random numbers + making a subtraction quiz:
Assign homework 3:
Logical operators
(!, &&, ||)
Case study using
logical operators
- leap year
The
switch
statement
Jason (2)
The
conditional expression (? :)
Operator precedence
and
operator associativity
Chapter 4a: Mathematical Functions
Java's
Math
class:
Assign homework 4:
Chapter 4b: Characters and Strings
The
char
primitive data type:
Advanced usage
of
char
data in Java programs:
Into to
instance methods
using the
String
class:
Assign homework 5:
Java's methods:
instance methods
and
static methods
:
Advanced usage
of
String
data in Java programs:
Assign homework 6:
Mixing operations with
String
and string input:
Converting
number strings
into
integers
or
float/double
Chapter 5: Loops
Introduction:
The
while
-loop:
Assign homework 7:
The
do-while
-loop:
The
for
-loop:
Some
example programs
using loops (GCD and prime factoring):
Nested
loops:
Assign homework 8:
The
break
and
continue
statements:
More
example programs
using loops (palindrome test and prime number test):
Chapter 6: (Static) Methods
Introduction:
Defining
a method:
Assign homework 9:
Program control
when
calling
a method +
activation record
:
Passing arguments
by value
- what happens when you update a parameter ?:
Modular programming
- how to use methods to package code together that perform a useful task:
Overloading
methods - how Java picks the method to invoke:
Assign homework 10:
The
scope
of a
local variable
:
Program development through
stepwise refinement
:
Assign homework 11:
Chapter 18: Recursion
Intro to
recursion
:
How a recursive method works - computing
factorial of n
recursively:
Solving problems with recursion:
Writing a
recursive
isPalindrome()
method:
Assign homework 12:
Improving program efficiency: recursive
helper
methods:
The
private
modifier:
Solving a
complex problem
with
recursion
- the
Tower of Hanoi
problem:
Recursion
vs
iteration (loop)
:
Assign homework 13:
Chapter 7: Single-Dimensional Arrays
Introduction to
array
:
Array basics:
Defining and using (accessing) array elements:
Processing data stored in arrays:
Assign homework 14:
The
for-each
loop access array elements:
Using an array to represent a deck of cards:
Assign homework 15:
Copying
arrays:
Extending
the
size
of an array:
Passing
arrays as arguments to methods:
Methods with
variable number
of arguments in Java:
Returning
an array from a method:
Assign homework 16:
Searching
arrays:
Sorting
arrays:
The
selection sort
algorithm:
The
insertion sort
algorithm:
The
merge sort
algorithm: (My material on Chapter 23.4)
Merging 2
sorted arrays
:
The
merge sort
algorithm:
The
running time
of the sorting algorithms:
Java's
Arrays
class
with useful array methods:
The command line argument of the
main( )
method:
Assign homework 17:
Arrays used in Mathematics:
Chapter 8: Multi-dimensional Arrays
Introduction to
2-dimensional arrays
:
2-dimensional array basics:
Defining and using 2-dimensional arrays:
Processing data stored in 2-dimensional arrays:
Passing a 2-dimensional array to a method:
Assign homework 18:
2-dimensional arrays used in Mathematics:
Chapter 9: Objects and Classes
Intro to
object oriented programming
Defining classes
and
creating objects
with classes:
Assign homework 19:
Constructors
of a class:
Accessing object
via reference variables:
No homework:
The
this
reference variable:
Copying
object:
The
copy constructor
of a class:
Array
of objects:
Intro to
Object Oriented Programming
- implementing a deck of cards
Assign homework 20:
Using classes from the Java Library:
The
default
visibility (accessibility) modifier:
Assign homework 21:
Data field encapsulation:
Immutable objects and the classes used to make them:
Passing objects to methods:
Assign homework 22:
Static
variables (and constants) and
static
methods:
Chapter 11.11: The ArrayList class
Intro to the
ArrayList
class in
Java's utilities library
:
Adding (= inserting)
new elements into an
ArrayList
object (and automatic arraylist size adaptation):
Assign homework 23:
Searching
for elements in an
ArrayList
object:
Replacing/Removing
elements in/from an
ArrayList
object and
other useful methods
:
Summary:
similarities and differences between an
array
and an
arraylist
:
Helper methods
for
Lists
:
Assign homework 24:
Misc topics in Chapter 10
Processing
primitive
data type as
objects
:
Automatic conversion
between a
primitive type
and its
wrapper class
:
The
BigInteger
and
BigDecimal
classes (arbitrary length numbers):
No homework
Chapter 11: Inheritance and Polymorphism
Introduction to
inheritance
:
Rex
The
Object Oriented Design
methodology (superclass and subclass):
Program design
using the
Object Oriented Design
methodology:
Relationship
between superclass and subclass and their
constructors
:
Invoking methods in the superclass from inside a subclass:
Overriding vs. overloading:
The
Object
class and its
toString()
method:
Polymorphism
:
Application of
polymorphism
:
Upcasting
and
downcasting
object references:
The
protected
accessibility classfier:
Preventing
a class from being extended by other classes:
Chapter 13: Abstract classes and Interfaces
Abstract
classes:
Interfaces
:
Java's
Comparable
interface
:
Released AP Exam
:
Multiple Choice questions 1-10:
Multiple Choice questions 11-20: