Correlations

Java Software Solutions for AP® Computer Science, 2nd Edition ©2007

John Lewis, William Loftus, and Cara Cocking

Correlated to: The College Board AP® Standards for Computer Science A

SE = Student Edition
TE = Teacher Edition

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.

A. Program Design
1. Read and understand a problem description, purpose, and goals SE/TE: 24–34, 126–127, 160–168, 168–172
2. Apply data abstraction and encapsulation SE/TE: 59, 62–63, 204–207, 435
3. Read and understand class specifications and relationships among the classes ("is-a," "has-a" relationships) SE/TE: 228–239, 392–400, 419
4. Understand and implement a given class hierarchy SE/TE: 392–400, 401–415, 419, 421–422, 436–438
5. Identify reusable components from existing code using classes and class libraries SE/TE: 59, 88–95, 419–432
B. Class Design
1. Design and implement a class SE/TE: 196–228, 288–292,419–432
2. Design an interface SE/TE: 219–288, 295–303, 432–438
3. Choose appropriate data representation and algorithms SE/TE: 58–60, 72–74, 127, 288–292, 343–353
4. Apply functional decomposition SE/TE: 223–228
5. Extend a given class using inheritance SE/TE: 392–396, 401–432

II. Program Implementation

The overall goals for 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.

A. Implementing techniques
1. Methodology
a. Object-oriented development SE/TE: 26, 58–60
b. Top-down development SE/TE: 127
c. Encapsulation and information hiding SE/TE: 59, 204–207
d. Procedural abstraction SE/TE: 62–63
B. Programming constructs
1. Primitive types vs. objects SE/TE: 58–63, 72–74, 262
2. Declaration
a. Constant declarations SE/TE: 71–72, 146, 368
b. Variable declarations SE/TE: 68, 217–218
c. Class declarations SE/TE: 198–207
d. Interface declarations SE/TE: 279–288
e. Method declarations SE/TE: 207–218
f. Parameter declarations SE/TE: 210, 268–269
3. Console output (System.out.print/println) SE/TE: 28, 61–62
4. Control
a. Methods SE/TE: 207–218
b. Sequential SE/TE: 128
c. Conditional SE/TE: 128–131
d. Iteration SE/TE: 157–160, 166, 286–288, 471
e. Recursion SE/TE: 467–499
C. Java library classes (included in the A-level AP® Java Subset)
Object SE/TE: 404–408, 635
Comparable SE/TE: 284–286, 630
Integer SE/TE: 85–88, 632
Double SE/TE: 87–88, 630
String SE/TE: 83–87, 638
Math SE/TE: 94–95, 635
Random SE/TE: 91–93, 636
ArrayList SE/TE: 358–363, 629

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.

A. Testing
1. Test classes and libraries in isolation SE/TE: 41, 127
2. Identify boundary cases and generate appropriate test data SE/TE: 127
3. Perform integration testing SE/TE: 127, 187, 251–252
B. Debugging
1. Categorize errors: compile-time, run-time, logic SE/TE: 41
2. Identify and Correct Errors SE/TE: 40
3. Techniques: use a debugger, add extra output statements, hand-trace code SE/TE: 41, 126–127, 216
C. Understand and modify existing code SE/TE: Programming Projects 52–53, 119–121, 187–189, 251–252, 310–311, 383–385, 457–458, 505–507, 543–544, 595–596
D. Extend existing code using inheritance SE/TE: 392–396, 401–432
E. Understand error handling
1. Understand runtime exceptions SE/TE: 276–278, 321, 331
F. Reason about programs
1. Pre- and post-conditions SE/TE: 215–217
2. Assertions SE/TE: 216–217
G. Analysis of algorithms
1. Informal comparisons of running times SE/TE: 343, 351–353
2. Exact calculation of statement execution counts SE/TE: 343, 351–353
H. Numerical representations and limits
1. Representations of numbers in different bases SE/TE: 7–9
2. Limitations of finite representations (e.g., integer bounds, imprecision of floating-point representations, and round-off error) SE/TE: 72–74

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.

A. Simple data types (int, boolean, double) SE/TE: 72–74, 85–88
B. Classes SE/TE: 28, 59–60, 198–207
C. One-dimensional arrays SE/TE: 318–337

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.

A. Operations on A-level data structures previously listed
1. Traversals SE/TE: 361, 559
2. Insertions SE/TE: 345–348
3. Deletions SE/TE: 520, 528, 573
B. Searching
1. Sequential SE/TE: 338–343
2. Binary SE/TE: 338, 341
C. Sorting
1. Selection SE/TE: 343–345
2. Insertion SE/TE: 345–348
3. Mergesort SE/TE: 482–487

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.

A. Major hardware components
1. Primary and secondary memory SE/TE: 10–18
2. Processors SE/TE: 10, 16–18
3. Peripherals SE/TE: 12
B. System software
1. Language translators/compilers SE/TE: 37–39
2. Virtual machines SE/TE: 12
3. Operating systems SE/TE: 3–4
C. Types of systems
1. Single-user systems SE/TE: 10–18
2. Networks SE/TE: 18–24
D. Responsible use of computer systems
1. System reliability SE/TE: 654–656
2. Privacy SE/TE: 656–665
3. Legal issues and intellectual property SE/TE: 650–654
4. Social and ethical ramifications of computer use SE/TE: 654, 660, 662

AP® is a trademark registered and/or owned by the College Board, which was not involved in the production of, and does not endorse, this site.