You are on page 1of 12

AP 

Computer Science AB Syllabus
Course description:

This course is comprised of college material, and is conducted in a rigorous manner.  It is 
designed for students who have a strong background in mathematics and interest in the field of 
computer science. 
The course emphasizes proper programming methodology, algorithmic development, data 
structures, and object oriented programming (OOP) and design.  Students will become proficient 
in creating and implementing classes.  This includes creating new classes using inheritance and 
implementing interfaces.

Topics studied in this course include a review of computer platforms and architecture; objects 
and primitive data; program statements; writing and enhancing classes; inheritance; one and two­
dimensional arrays; advanced data structures such as: trees, linked lists, sets, and maps; 
recursion; and searching and sorting techniques.  A detailed scope and sequence is shown below. 

Every area that is referenced in the AP  Computer Science AB Course Description is studied. 

Students will be expected to use their knowledge of proper programming and design techniques 
when creating programs in this course. Programs are implemented using the JAVA programming 

language.  Upon completion of the course, students will be able to take the College Board AP
Computer Science AB exam. 

All AP Computer Science classes are taught in a computer lab. Each student has a computer 
workstation.   Lessons are taught using Socratic methods.  Portions of programs are presented and 
discussed.  Students create sample classes with the instructor.  About two­thirds of each class 
period is spent on the computer.
Major Texts
J. Lewis, W. Loftus, and C. Cocking, Java Software Solutions for AP Computer Science, 1st ed., 
Prentice Hall, 2004.

K. Lambert and M. Osbourne, Fundamentals of Java, Comprehensive Course, 2nd ed., South­
Western, 2003.

Wu, C. Thomas. An Introduction to Object –Oriented Programming with Java –2nd ed. New 
York, NY: The McGraw­Hill companies, Inc., 2001

College Board. AP GridWorld Case Study. New York: College Entrance Examination Board, 
2006.
K. Lambert and M. Osbourne, Activities Workbook for Fundamentals of Java, South­Western, 
2003.

Teukolsky, Roselyn. Barron’ s AP Computer Science Levels A and AB 2007, 3rd ed.
Hauppauge, N.Y.: Barron’ s Educational Series, 2006.

S. Horowitz, Addison­Wesley’s Review for the AP Computer Science Exam in Java, Addison­
Wesley, 2004.

Course Planner
The resource list includes the following text references Fundamentals of Java (FJ), Java  
Software Solutions for AP Computer Science (SS), An Introduction to Object –Oriented  
Programming with Java –Thomas C. Wu (TCW)  
Unit Title, Topics and  Resource, Assessment, 
(Weeks) Student Objectives and Strategies
Thomas C. Wu (Introduction to Object­ Resources: 
Oriented Programming and Software   • TCW – Lesson 1
Development)
Topics: [C1], [C2], [C7] Assessment:
• Classes and Objects • Draw an object diagram for a Person 
• Messages and Methods class and two Person objects. 
• Class and Instance Data Values • Draw an object diagram for Account 
• Inheritance Object with instance methods deposit 
Objectives: and withdraw. 
1 • Name the basic components of  • Draw object diagram with instance 
(0­2) object­oriented programming. variables. 
• Differentiate classes and objects. • Vocabulary Inheritance, superclass, 
• Differentiate class and instance  subclass. 
data values. • Exercise 1.7 pg 34
• Draw object diagrams using icons 
for classes and objects
• Describe the significance of 
inheritance in object­oriented 
programs. 

1 Fundamentals of Java (First Java   Resources: 
(3) Programs) • FJ – Unit 1 – Lesson 2
Topics: [C4], [C5]
Assessment:
• The Java Virtual Machine and 
Byte Code
• Write a program that displays you 
name, address and telephone number
• Hello World
• Write a program that displays a yield 
• Edit, Compile and Execute
sign enclosed in a triangle.
• Turtle Graphics
• Write a program that calculates and 
Objectives:
• Explain the Java virtual machine  prints the number of minutes in a year
and byte code.  • Write a program that draws two 
• Describe the structure of a simple  vertical line segments showing Muller­
Java Program Layer Illusion.
• Edit, compile, and run a program 
using a Java development 
environment.
• Understand compile­time errors.
• Write a simple turtle graphics 
program. 

Fundamentals of Java (Syntax, Errors   Resources: 
and Debugging) • FJ – Unit 1 – Lesson 3
Topics: [C4] , [C5] Assessment:
• Language Elements • Write a program that takes the length 
• Basic Java Syntax and Semantics of an edge as input and prints the 
• Terminal I/O for Different Data  cube’s surface area as output. 
Types. (Remember to analyze, design, 
• Comments implement and test)
• Programming Errors • Write a program that prompts user for 
• Debugging input of regular and over time hours. 
Objectives: After that computes employee’s total 
1 weekly pay.
• Construct and use numeric and 
(4) • Use the TurtleGraphics package to 
string literals.
display the employee’s wages in a 
• Name and use Variables and 
histogram. After taking inputs and 
constants.
computing results, your program 
• Create arithmetic expressions.
should create a pen that displays five 
• Concatenate two strings or a 
horizontal lines of varying length. 
number and a string. 
• Know how to use comments in a 
program.
• Tell the difference between syntax 
errors, runtime errors and logic 
errors. 
2 Fundamentals of Java (Introduction to   Resources: 
(5­6) control Statements) • FJ – Unit 1 – Lesson 4, 
Topics:[C1] Unit 2 Lesson 6
• Addition Operators Assessment:
• Standard Classes and Methods • A 2­minute telephone call to 
• The If and if­else statements. Lexington, Virginia, costs $1.15. Each 
• The while, the for statement. additional minute costs $0.50. Write a 
• Nested Control Statements and the  program that takes the total length of a 
break Statements.  call in minutes as input and calculates 
• Errors in Loops and displays the cost. 
• Logical operators • Write a program that prompts user for 
• Nested if statements.  input of base integer number. Then 
prompts user to enter exponent, the 
Objectives:
program displays base number to the 
• Use the increment and decrement 
power. The program halts when the 
operators. 
user enters ­1 for the power.
• Use if and if­else statements to 

Project Unit 1­4 pg 128  
make choices.

Written questions pg 121
• Use while and for loops to repeat a 
process. 
• Construct appropriate conditions 
for control statements using 
relational operators. 
• Detect and correct common errors 
involving loops.
• Construct complex Boolean 
expressions using the logical 
operations. 
• Understand the logic of nested if 
statements and extended if 
statements. 
Fundamentals of Java (Introduction to   Resources: 
Defining Classes) • FJ – Unit 2 – Lesson 5
Topics: [C1] , [C2], [C4], [C6] Assessment:
• The internal structure of Classes  • Modify the smiling faces program of 
and Objects this lesson by completing the method 
• The Structure and Behavior of  drawLine. Add the instance variable 
Methods.  radius and color and the mutators 
• Scope and Lifetime of Variables. setRadius and SetColor.  

2 Objectives: • Develop a new class called Car. A car 
• Design an implement a simple  displays two wheels, a body (a long 
(7) rectangle), and a passenger 
class from user requirements. 
• Use visibility modifiers to make  compartment (a shorter rectangle). Be 
methods visible to clients and  sure to include the appropriate helper 
restrict access to data within a  methods. Test­drive your new class in 
class.  an interface similar to that of the 
• Use instance variables, local  smiling faces program. 
variables and parameters 
appropriately. 

3 FJ – Arrays, Recursion, and Complexity  Resources: 
(Introduction to Arrays) • FJ – Unit 3 – Lesson 8
Topics: [C1] , [C2], [C4] Assessment:
• Conceptual Overview • Write a program that takes 10 floating­
• Simple Array Manipulations point numbers as inputs. The program 
• Looping through Arrays displays the average of the numbers 
• Declaration Arrays followed by all of the numbers that are 
• Parallel Arrays greater than the average. As part of 
• Two­Dimensional Arrays your design, write a method that takes 
• Arrays and Methods an array of doubles as a parameter and 
(8­9) returns the average of the data in the 
• Arrays of objects
array. 
Objectives:
• Modify the program of Project 8.4 so 
• Write programs that handle 
that it displays not only the median 
collections of similar items. 
and mode of the list of numbers but 
• Declare array variables and 
also a table of the numbers and their 
instantiate array objects.
associate frequencies. 
• Use loops and write methods to 
manipulate arrays. 
• Create parallel arrays and two­
dimensional arrays.
Grid World Case Study  (parts 1­4) Resources: 
Topics: [C6] • Grid World Case Study part 1 ­ 4
• GridWorld Case Study part 1 – 4 Assessment:
• Work on GridWorld Case Study  • Exercise from within the case study. 
part 1­4 • Read the GridWorld case study 
Objectives: thoroughly and get familiar with 
• Review Testing classes, methods and interfaces.  
(10­11) • Understand the Bug class, Runner 
class, Grid interface.
• Extend the Bug class by creating a 
specialized bug with new 
characteristics. 
• Class Modifications
• Inheritance 

3 FJ Arrays, Recursion and Complexity  Resources: 
(12)  (Classes) • FJ – Unit 3 – Lesson 9
Topics: [C1], [C6]  Assessment:
• Class (static) Variables and  • Design a hierarchy of classes that 
Methods. represents the classification of 
• Code Reuse through Inheritance artifacts, such as vehicles. 
• Inheritance and Abstract classes • Add a method perimeter to the shape 
• Acceptable Classes for Parameters  hierarchy from this lesson. This 
and Return Values. method should return the 
• Exceptions circumference of a circle and a wheel 
Objectives: and the perimeter of a rectangle. 
• Know when it is appropriate to  • Using Compute Weekly Pay Case 
include class (static) variables and  Study form this lesson, modify the 
methods in a class.  payroll system of the case study so that 
• Understand the use of inheritance  taxes are deduced from gross pay. The 
by extending a class. tax rate is a flat 10 percent.  
• Understand the use of 
polymorphism and know how to 
override methods in a superclass.
• Understand the implications of 
references types of equality, 
copying and mixed­mode 
operations.  

FJ Arrays, Recursion and Complexity  Resources: 
(Arrays) • FJ – Unit 3 – Lesson 10
Topics: [C1], [C2] Assessment:
• Advance operations on Strings • Write a program that inputs 10 
• Searching Arrays integers into an array, sort the array 
• Sorting Arrays with a selection sort, and displays its 
• Insertions and Removals contents before and after the sort.
• Working with Arrays of Objects • Modify Student Test Score Case Study 
• The Class java.util.ArrayList for this lesson so that it displays a list 
Objectives: of the words in the text area and their 
associated frequencies. A word’s 
• Use string methods appropriately.
frequency is the number of times it 
• Write a method for searching an 
appears in the text. You should use an 
array. 
array of String of the worlds and a 
• Write methods to perform 
3 parallel array of int for the 
insertions and removals at given 
(13) frequencies. The program should sort 
positions in an array.
the list of worlds before output. If the 
• Understand the issues involved 
number of unique worlds exceeds 50, 
when working with arrays of 
sop the processing of input and display 
objects.  
a message in the message box.   

3 FJ Arrays, Recursion and Complexity  Resources: 
(14) (Recursion, complexity and Searching and   • FJ – Unit 3 – Lesson 11
Sorting) Assessment:
Topics:  • Write a recursive method that returns a 
• Recursion string with the characters in reverse 
• Complexity Analysis order and test the method with a Tester 
• Binary Search program. 
• Quicksort • Write a tester program to help assess 
Objectives: the efficiency of the Tower of Hanoi 
program. This program should be 
• Design and implement a recursive 
similar to the one developed from the 
method to solve a problem
Fibonacci method.
• Understand how computer 
executes a recursive method.
• Understand the behavior of a 
complex sort algorithm such as the 
quicksort. 

4 FJ Using Abstract Data Types (Object   Resources: 
(15­18) Oriented Analysis and Design, Linear   • FJ – Unit 4 – Lesson 12, 13, 14, 15
Collections: Lists and  Stacks, Unordered   Assessment:
collection Sets and Maps) • Modify case study Maintain a List of 
Topics: [C1], [C2], [C4] Tasks from this lesson so that it allows 
• Analysis , Design and  the user to scroll through all the tasks 
Implementation in a message box. When the user 
• Overview of Collections selects a new button named View All, 
• Lists and Iterators the TaskListView responds by sending 
• Stacks the message toString to the 
• Queues and Priority Queues TaskListModel, which returns a string 
• Sets and sorted Sets consisting of all the tasks. This string 
is then displayed in a message box. 
• Maps and sorted maps
Objectives: • Write a program that tests its inputs 
for palindromes. (Hint: Use a string 
• Understand the general role of 
tokenizer and a stack.)
analysis and design in the software 
development process. 
• Write a program that maintains a wait 
list of students for admission to a 
• Understand the difference between 
college course. Seniors are given first 
aggregation, inheritance and other 
priority, followed by juniors, 
relationships among classes. 
sophomores and freshmen. The 
• Distinguish fundamental 
program should allow the user to 
categories of collections, such as 
perform the following tasks:
linear, hierarchical, graph and 
unordered.  a. Enter a Student’s name and 
class, adding that student to the 
• Understand the basic features of 
wait list
lists and their application
• Recognize the difference between  b. Remove the next student from 
index­based operations and  the wait list
content­based operations on lists.  c. Clear the wait list. 
• Understand behavior of a stack    
and recognize applications in  When any of these operations is 
which a stack would be useful.  performed, a display is updated with 
• Understand the behavior of a  the appropriate information. The 
queue and recognize application in  structure and user interface of this 
which a queue would be useful.  program can be similar to that of the 
emergency room scheduler. 

GridWorld Case Study (part 5) Resources: 
Topics: [C6] • GridWorld Case Study, The College 
• Explain girds data structure Board
Objectives: Assessment:
• Understand the BoundedGrid  • New variations to the bug class. 
(19­20) Implimentations. • Display of Classes extended from 
• Consider alternate implementation  Critter class. 
for BoundedGrid class • Understanding of grid data structure. 
• Understand implementation of 
UnboundedGrid class.

FJ Implementing Abstract Data Types  Resources: 
(Implementing Lists, Stacks, and Queues) • FJ – Unit 5 – Lesson 16
Topics: [C3] Assessment:
• Interfaces, Multiple  • Complete the classes FSAIndexedList, 
Implementations and Prototypes. SLIndexedList, FSAPositionalList, 
• The Fixed­Size Array  DLPositionalList and test them with an 
Implementation of Indexed Lists appropriate tester program.
• Complexity Analysis of Indexed  • Add an iterator method to the interface 
List Implementation IndexedList. Then implement this 
• Fixer­Size Array Implementation  method in the class FSAIndexedList 
of Positional Lists using the techniques described in the 
• Iterators lesson. Test you iterator with an 
5 • Implementation of Stacks and  appropriate tester program. 
(21­22) Queues 
Objectives:
• Use an array to implement an 
indexed list.
• Use an array to implement 
positional list.
• Use arrays or linked structures to 
implement stacks and queues.
• Understand the run­time and 
memory trade­offs of array­based 
and link­based implementations of 
linear collections. 

5 FJ Implementing Abstract Data Types  Resources: 
(23­24) (Implementing Sets and Maps) • FJ – Unit 5 – Lesson 17
Topics: [C1] , [C3] Assessment:
• The Set and Map Prototypes • Modify the program TESTCODES 
• List Implementation of Sets and  from this lesson to implement the 
Maps linear method of resolving collisions. 
• Hashing Implementation of Maps  The code for this method should be 
and Sets. packaged in a private Java helper 
Objectives: method. Use an array of sufficient 
• Explain why a list implementation  capacity to observer any clusters that 
of sets and maps is simple but  develop. Track and display the number 
inefficient. of comparisons required to resolve 
• Develop hash function to  collisions as well. Test this method 
implement sets and maps.  will load factors of .33, .5, .75 and 1.  
• Understand why a hashing 
implementation of sets and maps 
can be very efficient. 
FJ Implementing Abstract Data Types  Resources: 
(Implementing Trees and Priority Queues) • FJ – Unit 5 – Lesson 18
Topics: [C1] , [C3] Assessment:
• An overview of Trees • Write the implementation of a sorted 
• Binary Tree Traversals set class using a binary serch tree. 
• A linked Implementation of  Your solution should consist of an 
Binary Trees interface, SortedSetPT, an 
• An Array Implementation of  implementing class, TreeSetPT, and a 
Binary Trees tester program. You should decide 
• Implementing Heaps wich methods should be included in 
5 Objectives: the sorted set’s interface. Be sure to 
(25­26) throw an appropriate exception if a 
• Use the appropriate terminology to 
client’s item is not comparable. 
describe trees. 
• Distinguish different types of 
hierarchical collections, such as 
general trees, binary search  trees, 
and heaps. 
• Use binary search trees to 
implement sorted sets and sorted 
maps. 
• Use heaps to implement priority 
queues. 
6 FJ Graphics, Files, Apples and Swing  Resources: 
(27) (Files) • FJ – Unit 6 – Lesson 20
Topics: [C1], [C6] Assessment:
• File Class • Write a program that reads names 
• File input  from a text file. The names are 
• File output separated by new line characters, are 
• Other Input/Output Situations in sorted order, and some are duplicate 
Objectives: names. The program should write the 
• Understand the use of the classes  names to a different text file without 
for the processing files in the  the duplicate names. Allow the use to 
java.io.package.  specify the file names in text fields.
• Open and use input file streams for  • Assume that a text file or names has 
reading one character, one line, or  each name on a separate line and that 
one work at a time from text files.  names are in random order. Write a 
• Use data input and output streams  program that inputs the names, sorts 
for the transfer of specific types of  them, and write them back to the same 
data to and from files.  file.  
• Use file dialogs to open 
connections to input and output 
files. 
Preparation for the AP Exam Resources: 
Topics: [C6], [C7] • Barron’s AP Computer Science 
• Revisit GridWorld Case Study Levels A and AB
• Appropriate free­response • Review for the AP Computer 
• Appropriate multiple choice  Science Exam in Java
answers.  Assessment:
(28­31)
Objectives: • Exercise from the text
• Review GridWorld Case study and • Previous free response questions from 
gain complete understanding of  AP Central. 
it’s classes and methods.  •
Practice Exams
• Review multiple choice and open 
ended questions.
6 FJ Graphics, Applets and Swing (Simple   Resources: 
(32­33) Two­Dimensional Graphics, Introduction   • FJ – Unit 5 – Lesson 18
to HTML and Applets, Swing and AWT) Assessment:
Topics: [C1], [C6] • Write a program that allows the user to 
• The Conceptual Framework for  change the pen color and the 
compute Graphics. background color of the application 
• The Method repaint window and to view its size. The 
• The Method getGraphics program should provide two menus of 
• Responding to Mouse Events.  colors. When the user selects a color 
• Simple Text elements from the Pen menu, the program sets 
• Linking to other documents.  the window’s graphics context to that 
• Applets.  color. When the user selects a color 
from the Background menu, the 
• The Swing and AWT philosophy
program sets the window’s 
• GUI components. 
background to that color. The program 
Objectives:
also displays the height and width of 
• Understand difference between  the window’s graphics context at the 
Cartesian coordinates and screen  center of the window. These values 
coordinates.  should be updated whenever the user 
• Use methods to draw images in  resizes the window. 
two­dimensional graphics.  • Redo the Fahrenheit to Celsius 
• Create a program that graphs data  temperature conversion application 
with charts.  with Swing/AWT so that your 
• Use the appropriate markup tags to  program adheres to the 
include images in Web pages. 
• Convert Java applications to an  model/view/controller pattern as 
applet and embed the applet in a  described in the case study.   
web page. 
• Understand how to structure a 
GUI­based program using Java’s 
Swing and AWT packages. 

Final Group Project Resources: 
Topics: [C6], [C7] • Workbook for Fundamentals of Java
• Will vary from Group to Group Assessment:
Objectives: • All steps taken to create the 
• As part of there final grade  application. 
(34­36)
students will work in groups to  • Snap of final run of student 
create an application, based upon  application. 
their interest and teacher’s 
approval. 

[C1] The course teaches students to design and implement computer­based solutions to problems in a 
variety of application areas. 

[C2] The course teaches students to use and implement commonly used algorithms and data structures. 

[C3] The course teacher students to develop and select appropriate algorithms and data structures to solve 
problems.

[C4] The course teaches students to code fluently in an object­oriented paradigm using the programming 
language Java. The course teaches students to use standard Java library classes from the AP Java subset 
delineated in Appendixes A and B of the AP Computer Science Course Description.  

[C5] The course teaches students to identify the major hardware and software components of a computer 
system, their relationship to one another, and the roles of these components within the system. 

[C6] The course teaches students to read and understand a large program consisting of several classes and 
interacting objects, and enables students to read and understand the current AP Computer Science Case 
Study posted on AP Central. 

[C7] The course teaches students to recognize the ethical and social implications of computer use. 

Computer Facilities: 

There are two computer labs available to students enrolled in computer science courses.  Each lab 
contains 20 PCs.  Each lab also contains scanners, CD­RW drives, a data projector, and laser 
printers.
Each student has an account on a networked server.  They store their program files in their 
individual accounts.  They have access to a public drive for instructor­supplied programs and 
files. The computer labs are open before and after school and during some lunch periods.

You might also like