AP CS with Horstmann's Java Concepts

Sample Syllabus

This is a sample syllabus for using Horstmann, Java Concepts 5th ed., in an AP Computer Science course.

Unit 1. Fundamentals about Hardware and Software

Chapter 1

This unit briefly introduces the students to computer architecture, networking, system software, and the process of compiling and executing code.

Unit 2. An Introduction to Objects

Chapter 2

Chapter 3

GridWorld Part 1

Students learn how to use objects of existing classes, and the develop the skills necessary for implementing classes whose design has been given to them. Homework problems emphasize the use of library classes and the implementation of given designs, by providing students with class outlines to complete or with tester classes that constrain the API.

Unit 3. Programming Fundamentals

Chapter 4

Chapter 5 (4th ed.: Chapter 6)

Chapter 6 (4th ed.: Chapter 7)

GridWorld is used to visualize loops

This unit covers fundamental programming concepts: numbers and strings, decisions, and loops. These concepts are presented in the context of classes and methods.

Unit 4. Arrays and an introduction to algorithms

Chapter 7. (4th ed.: Chapter 8) (Omit section 6 in A-level class)

This unit covers arrays, array lists, and array algorithms. The emphasis is on array algorithms and an informal introduction of running time analysis through the discussion of examples with linear and quadratic running time.

GridWorld is used to visualize array algorithms.

Unit 5. An Introduction to Class Design

Chapter 8. (Omit sections 7 and 9.) (4th ed.: Chapter 9)

This unit covers the fundamentals of OO design: identifying classes and methods, coupling, cohesion, programming by contract.

Unit 6. Interfaces and Inheritance

Chapter 9, Sections 1 - 4 only (Omit section 4 in A-level class) (4th ed.: Chapter 11)

Chapter 10 (4th ed.: Chapter 13)

GridWorld parts 2 - 4

This unit covers interfaces and inheritance. Interfaces are covered first, thus allowing students to see polymorphism without the syntactical complications of superclass construction and superclass method invocation.

Unit 7. Algorithms

Chapter 13 (Omit section 13.4 in an A level class; omit section 13.5) (4th ed.: Chapter 18)

Chapter 14 (Omit big-Oh and QuickSort in an A level class; omit section 14.8) (4th ed.: Chapter 19)

This unit covers recursion, sorting, and searching. In an A level class, logarithmic time complexity can be discussed informally.

Unit 8. Social and Ethical Issues in Computer Science

Selected "Random Topic" readings, supplemented by readings of current interest.

The AP course requires activities related to “Computing in Context”. Random Topic notes in chapters 3, 5, 7, 11, 16, are supplemented with recent news stories about electronic voting machine problems, software and music piracy, artificial intelligence, privacy, viruses and phishing, or spectacular computer system failures. Students produce reports and presentations that show evidence of reflective contemplation.

Unit 9. Files and Exceptions (AB only)

Chapter 11 (4th ed.: Chapter 15 and Chapter 16 Section 1)

This unit covers exception handling in the context of reading and writing text files.

Unit 10. OO Design (AB only)

Chapter 12 (4th ed.: Chapter 17)

This unit presents a systematic methodology for object-oriented design. Students learn to design and implement larger programs that use multiple collaborating classes. Students complete a substantial assignment in which they analyze a problem, produce an object-oriented design, and implement a solution.

Unit 11. Data Structures (AB only)

Chapter 15 (4th ed.: Chapter 20)

Chapter 20 (4th ed.: Chapter 21)

GridWorld part 5

This unit presents the classic data structures and their applications. Students solve a number of exercises that use stacks, queues, sets, maps, and priority queue in their implementations and reason about design tradeoffs.

Correlation with the 2007/2008 AP Computer Science Course Description

I. Object-Oriented Program Design

The overall goal for designing a piece of software (a computer program) is to correctly solve the given problem. At the same time, this goal should encompass specifying and designing a program that is understandable, can be adapted to changing circumstances, and has the potential to be reused in whole or in part. The design process needs to be based on a thorough understanding of the problem to be solved.

Computer Science A and AB Computer Science AB only
A. Program design
 1. Read and understand a problem description, purpose, and goals. Chapters 3, 8, and exercises throughout the course  1. Specify the purpose and goals for a problem. Chapter 12
 2. Apply data abstraction and encapsulation. Chapters 2, 3, 8
 3. Read and understand class specifications and relationships among the classes (“is-a,” “has-a” relationships). Chapters 2, 3, 8  3. Decompose a problem into classes; define relationships and responsibilities of those classes Chapter 12
 4. Understand and implement a given class hierarchy. Chapters 9, 10
 5. Identify reusable components from existing code using classes and class libraries. Chapters 2, 8, 15, and exercises throughout the course
B. Class design
 1. Design and implement a class. Chapters 3, 8  1. Design and implement a set of interacting classes. Chapter 12
 2. Design an interface. Chapter 9
 3. Choose appropriate data representation and algorithms. Chapters 8, 15  3. Choose appropriate advanced data structures and algorithms. Chapter 16
 4. Apply functional decomposition. Chapters 3, 8
 5. Extend a given class using inheritance. Chapter 10

II. Program Implementation

The overall goals of program implementation parallel those of program design. Classes that fill common needs should be built so that they can be reused easily in other programs. Object-oriented design is an important part of program implementation.

Computer Science A and AB Computer Science AB only
A. Implementation techniques
 1. Methodology
  a. Object-oriented development Chapters 2, 3, 8
  b. Top-down development
  c. Encapsulation and information hiding Chapters 2, 3, 8
  d. Procedural abstraction Chapters 3, 8
B. Programming constructs
 1. Primitive types vs. objects Chapter 4
 2. Declaration
  a. Constant declarations Chapter 4
  b. Variable declarations Chapter 2
  c. Class declarations Chapter 3
  d. Interface declarations Chapter 9
  e. Method declarations Chapter 3
  f. Parameter declarations Chapter 3
 3. Console output (System.out.print/println) Chapter 2
 4. Control
  a. Methods Chapters 2, 3
  b. Sequential Chapter 6
  c. Conditional Chapter 6
  d. Iteration Chapter 7
  e. Recursion Chapter 13
C. Java library classes (included in the A-level AP Java Subset) Chapters 2, 4, 8 C. Java library classes (included in the AB-level AP Java Subset) Chapters 11, 14, 15, 16

III. Program Analysis

The analysis of programs includes examining and testing programs to determine whether they correctly meet their specifications. It also includes the analysis of programs or algorithms in order to understand their time and space requirements when applied to different data sets.

Computer Science A and AB Computer Science AB only
A. Testing
 1. Test classes and libraries in isolation. Chapters 2, 3
 2. Identify boundary cases and generate appropriate test data. Chapter 5
 3. Perform integration testing. Chapter 7
B. Debugging
 1. Categorize errors: compile-time, run-time, logic. Chapter 1
 2. Identify and correct errors. Chapter 1 and numerous "Common Error" notes
 3. Employ techniques such as using a debugger, adding extra output statements, or hand-tracing code. Chapter 6
C. Understand and modify existing code Exercises, GridWorld Case Study
D. Extend existing code using inheritance Chapter 10, GridWorld Case Study
E. Understand error handling
 1. Understand runtime exceptions. Chapters 4
2. Throw runtime exceptions Chapter 11
F. Reason about programs
 1. Pre- and post-conditions Chapter 8
 2. Assertions Chapter 8
G. Analysis of algorithms
 1. Informal comparisons of running times
2. Exact calculation of statement execution counts
3. Big-Oh notation Chapter 14
4. Worst-case and average-case time and space analysis Chapter 14
H. Numerical representations and limits
 1. Representations of numbers in different bases Chapter 4
 2. Limitations of finite representations (e.g., integer bounds, imprecision of floating-point representations, and round-off error) Chapter 4

IV. Standard Data Structures

Data structures are used to represent information within a program. Abstraction is an important theme in the development and application of data structures.

Computer Science A and AB Computer Science AB only
A. Simple data types (int, boolean, double) Chapter 4
B. Classes Chapters 2, 3, 9
C. One-dimensional arrays Chapter 8
D. Two-dimensional arrays Chapter 8
E. Linked lists (singly, doubly, circular) Chapter 15
F. Stacks Chapter 15
G. Queues Chapter 15
H. Trees Chapter 16
I. Heaps Chapter 16
J. Priority queues Chapter 16
K. Sets Chapter 16
L. Maps Chapter 16

V. Standard Algorithms

Standard algorithms serve as examples of good solutions to standard problems. Many are intertwined with standard data structures. These algorithms provide examples for analysis of program efficiency.

Computer Science A and AB Computer Science AB only
A. Operations on A-level data structures previously listed A. Operations on AB-level data structures previously listed
 1. Traversals Chapter 8  1. Traversals Chapters 15, 16
 2. Insertions Chapter 8  2. Insertions Chapters 15, 16
 3. Deletions Chapter 8  3. Deletions Chapters 15, 16
 4. Iterators Chapters 15, 16
B. Searching
 1. Sequential Chapters 8, 14
 2. Binary Chapter 14
 3. Hashing Chapter 16
C. Sorting
 1. Selection Chapter 14
 2. Insertion Chapter 14
 3. Mergesort Chapter 14
 4. Quicksort Chapter 14
 5. Heapsort Chapter 16

VI. Computing in Context

A working knowledge of the major hardware and software components of computer systems is necessary for the study of computer science, as is the awareness of the ethical and social implications of computing systems. These topics need not be covered in detail but should be considered throughout the course.

Computer Science A and AB Computer Science AB only
A. Major hardware components
 1. Primary and secondary memory Chapter 1
 2. Processors Chapter 1
 3. Peripherals Chapter 1
B. System software
 1. Language translators/compilers Chapter 1, "Random Fact" in Chapter 9, 10
 2. Virtual machines Chapter 1
 3. Operating systems Chapter 1, "Random Fact" in Chapter 9
C. Types of systems
 1. Single-user systems Chapter 1, "Random Fact" in Chapter 9
 2. Networks Chapter 1, "Random Fact" in Chapter 2
D. Responsible use of computer systems
 1. System reliability "Random Fact" in Chapters 4, 6, 7
 2. Privacy "Random Fact" in Chapter 5 (Big Java only)
 3. Legal issues and intellectual property "Random Fact" in Chapter 16
 4. Social and ethical ramifications of computer use "Random Fact" in Chapter 3, 5, 7