AP Course Description Template V2.doc -...

14
1 AP Computer Science August 2014 June 2015 Class Description AP Computer Science is the second class after Pre-AP Computer Science that together teach the fundamentals of object-oriented programming and the Java programming language. The AP course begins by reviewing programming concepts and terminology from the Pre-AP class using Alice 3 (a programming environment that enables novice programmers to easily create animations and games using 3D worlds) and Greenfoot (an interactive Java development environment that allows development of two-dimensional graphical applications, such as simulations and interactive games). After building several Alice 3 animations and Greenfoot simulations, students learn additional concepts not covered in the Pre-AP class. Programming will be done in Java using the Eclipse IDE. The latter part of the course emphasizes object-oriented programming, problem solving and algorithm development, and includes the study of data structures, design, and abstraction. By the conclusion of this class, students should be ready to take the AP Computer Science exam and the Oracle Certified Associate, Java SE 7 Programmer exam. Course Resources Oracle Academy Java Fundamentals and Java Programming Online Course: http://ilearning.oracle.com/ilearn/en/learner/jsp/login.jsp?site=OracleAcad College Board. AP CS A Labs – Magpie, Elevens, and Picture Lab. New York: College Entrance Examination Board, 2013. Schram, Leon. Multiple Choice & Free Response Questions In Preparation For The AP Computer Science Examination 7th Ed. New York: D&S Marketing: 2009. Website: Alice: http://www.alice.org/ Website: Greenfoot: http://www.greenfoot.org/ Description of Computer Facilities The classroom contains enough desktop PCs so that each student has their own computer. Students will use these computer during class to complete programming assignments, run example programs during lecture, perform written work, and complete quizzes and tests. The computers will also be available after school in tutorials. These computers have internet access, the Sun Java SDK, Alice 3, Greenfoot, and the Eclipse Interactive Development Environment, tailored for our use. Teaching Methods and Philosophy The topics for this course are learned through class discussion, small group projects, individual and small group presentations, writing and debugging code, verifying program correctness, and other activities. Students are evaluated by the quality of the programming assignments, participation in group discussions, quizzes/homework/practice exercises, lesson quizzes, and semester and final exams, and rubrics applied to projects and presentations. All programming assignments are listed in this document and are assigned as time permits. By the end of the year, students will experience in excess of 20 hours of programming lab work. In order for the students to be successful in computer science topics, they must be confident in their knowledge of common algorithms to solve computer science problems. They must be able to choose the best (most efficient) method to solve a given problem and be able to use the deconstruction process to create an object that will solve that problem.

Transcript of AP Course Description Template V2.doc -...

1

AP Computer Science

August 2014 – June 2015

Class Description AP Computer Science is the second class after Pre-AP Computer Science that together teach the fundamentals of object-oriented

programming and the Java programming language. The AP course begins by reviewing programming concepts and terminology from

the Pre-AP class using Alice 3 (a programming environment that enables novice programmers to easily create animations and games

using 3D worlds) and Greenfoot (an interactive Java development environment that allows development of two-dimensional

graphical applications, such as simulations and interactive games). After building several Alice 3 animations and Greenfoot

simulations, students learn additional concepts not covered in the Pre-AP class. Programming will be done in Java using the Eclipse

IDE. The latter part of the course emphasizes object-oriented programming, problem solving and algorithm development, and

includes the study of data structures, design, and abstraction. By the conclusion of this class, students should be ready to take the

AP Computer Science exam and the Oracle Certified Associate, Java SE 7 Programmer exam.

Course Resources

Oracle Academy Java Fundamentals and Java Programming Online Course:

http://ilearning.oracle.com/ilearn/en/learner/jsp/login.jsp?site=OracleAcad

College Board. AP CS A Labs – Magpie, Elevens, and Picture Lab. New York: College Entrance Examination Board, 2013.

Schram, Leon. Multiple Choice & Free Response Questions In Preparation For The AP Computer Science Examination 7th Ed. New

York: D&S Marketing: 2009.

Website: Alice: http://www.alice.org/

Website: Greenfoot: http://www.greenfoot.org/

Description of Computer Facilities

The classroom contains enough desktop PCs so that each student has their own computer. Students will use these computer during

class to complete programming assignments, run example programs during lecture, perform written work, and complete quizzes and

tests. The computers will also be available after school in tutorials. These computers have internet access, the Sun Java SDK, Alice 3,

Greenfoot, and the Eclipse Interactive Development Environment, tailored for our use.

Teaching Methods and Philosophy

The topics for this course are learned through class discussion, small group projects, individual and small group presentations,

writing and debugging code, verifying program correctness, and other activities. Students are evaluated by the quality of the

programming assignments, participation in group discussions, quizzes/homework/practice exercises, lesson quizzes, and semester

and final exams, and rubrics applied to projects and presentations. All programming assignments are listed in this document and are

assigned as time permits. By the end of the year, students will experience in excess of 20 hours of programming lab work.

In order for the students to be successful in computer science topics, they must be confident in their knowledge of common

algorithms to solve computer science problems. They must be able to choose the best (most efficient) method to solve a given

problem and be able to use the deconstruction process to create an object that will solve that problem.

2

As time permits different business skills such giving presentations, writing resumes, and setting goals will also be incorporated. As it

is my goal not to just prepare the students for the AP exam but also to prepare them for a career.

Course Outline

The Oracle Academy Java Course is a year-long course that is divided into two semester-long courses, Java Fundamentals

(JF) and Java Programming (JP). Below are the sections and lessons in the course. A chart is available in the next section to

show a correlation between the “Computer Science A” column of the Topic Outline in the AP Computer Science Course

Description and each unit of this syllabus.

Every lesson includes a “Practice” section in which students demonstrate understanding of the lesson objectives. For those

lessons that include coding, the practice exercises require students to design solutions and then implement, document, and

test them. Additionally, every lesson is assessed by a multiple choice quiz. Finally, students are assessed by mid-term and

final exams covering the material presented that semester.

Semester 1: Oracle Academy Java Fundamentals (JF)

JF Section 1: Welcome and Introduction

Lesson 1.1: Welcome

Topics:

Stating the course goals and objectives

Describing the course map

Describing the learning strategy

Describing the software configuration and curriculum tools

Recognizing teamwork and project learning goals

Practice:

Power on computers

Software and folder tour

Log on to Oracle iLearning (learning management system) and identify all curriculum components

Introduce yourself to one person in the room

Present the person you have met

Form a team and define roles and tasks

Lesson 1.2: Introduction

Topics:

Using Alice3, and Greenfoot tools to learn Java

Using life experiences to identify skills needed for a project

Using life experiences to identify the project tasks for creating an animation or game

Understanding teamwork components and rubrics

Code of ethics and cyber security

Practice:

Launch Alice3 and run a sample storyboard animation

Launch Greenfoot and play a sample game

Review a teamwork scenario and produce a result

Present a summary of the teamwork activity and result produced

Review a result and produce a written scenario

Create journal and organize artifacts

Review IEEE code of ethics and relate to school group projects

Discuss cyber security and its impact in your country

JF Section 2: Using Alice 3

Lesson 2.1: Get Started with Alice 3

Topics:

Identifying scene components

Creating and saving a new project

Adding an object to a scene

Communicate the value of saving multiple versions of a scene

Coding a simple programming instruction

Use the copy and undo command

Understand the value of testing and debugging

Practice:

Identify scene components

Work with galleries, classes, and instances

Work with and save multiple scenes

Code and edit a programming instruction

Debug an animation

3

Lesson 2.2: Add and Position Objects

Topics:

Opening a saved version of a project

Adding multiple objects to a scene

Describing the difference between precise positioning and drag-and-drop (or imprecise) positioning

Using a one-shot procedure to precisely position an object in a scene

Editing properties of an object in the Scene editor

Describing three-dimensional positioning axes

Positioning the sub-parts of an object in the Scene editor

Practice:

Add multiple objects to a scene

Use precise positioning techniques to position an object in a scene

Use imprecise positioning techniques to position an object in a scene

Edit an object’s properties

Position the sub-parts of an object

Lesson 2.3: Use Procedures and Arguments

Topics:

Toggling between, and describing the visual differences between, the Scene editor and the Code editor

Locating and describing the purpose of the methods panel and the procedures tab

Using procedures to move objects

Adding Java programming procedures to the Code editor

Demonstrating how procedure values can be altered using parameters

Creating programming comments

Reordering, editing, deleting, copying, and disabling programming statements

Testing and debuging an animation

Practice:

Work with the Code editor tools

Create a program with pre-written procedures

Create comments to demonstrate understanding

Use procedures by deleting adding, copying, and pasting code

Test the procedures in the context of the animation

Debug the animation as necessary

Lesson 2.4: Add Rotation and Randomization

Topics:

Correlating storyboard statements with program execution tasks

Adding a simple control statement to the Code editor

Using random numbers to randomize motion

Practice:

Correlate storyboard statements with program execution tasks

Add a simple control statement to the code editor to repeat motion

Use random numbers to randomize motion

Lesson 2.5: Declare Procedures

Topics:

Comparing and defining an animation and a scenario

Writing a storyboard

Flowcharting a storyboard

Describing inheritance and how traits are passed from superclasses to subclasses

Describing when to implement procedural abstraction

Demonstrating how and when to declare a procedure with or without parameters

Identifying and using procedural abstraction techniques to simplify animation development

Practice:

Using functional decomposition to write a storyboard

Flowchart a storyboard

Map procedures to the storyboard

Identify and use procedural abstraction techniques to simplify animation development

Create an animation that demonstrates inheritance and procedural abstraction using parameters

Decompose an animation task into smaller, more simple procedures

Lesson 2.6: Use Control Statements

4

Topics:

Defining multiple control statements to control animation timing

Creating an animation that uses a control statement to control animation timing

Recognizing programming constructs to invoke simultaneous movement as it relates to multi-threaded programming

Practice:

Use a control statement to control animation timing

Define, compare, contrast, and use specific if-else, loops, do in order, and do together control statements

Recognize programming constructs to invoke simultaneous movement

Lesson 2.7: Use Functions

Topics:

Using functions to control movement based on a return value

Describe the differences in function return types

Practice:

Use functions to control movement based on a return value

Use each return type in an animation function

Lesson 2.8: Use the IF and WHILE Control Structures

Topics:

Using the IF control structure to effect execution of instructions

Using the WHILE control structure to create a conditional loop for repetitive behavior

Practice:

Use the IF and WHILE control structures to control movement based on a return value

Lesson 2.9: Use Expressions

Topics:

Creating an expression to perform a math operation

Interpreting a math expression

Practice:

Create an expression to perform a math operation

Create animations that require math expressions

Lesson 2.10: Use Variables

Topics:

Understanding variables and how they are used in programming

Compare and contrast datatypes in Alice

Practice:

Use variables in a program

Create animations that use various Alice datatypes

Lesson 2.11: Use Keyboard Controls

Topics:

Using keyboard controls to manipulate an animation

Creating event-driven animations

Practice:

Use keyboard controls to manipulate an animation

Create animations that demonstrate the Alice keyboard events to control animation

Lesson 2.12: Develop a Complete Animation

Topics:

Using functional decomposition to write a scenario and storyboard

Completing an animation

Testing an animation

Repositioning objects at run-time

Planning the presentation of a completed animation project

Practice:

Use functional decomposition to write a scenario and storyboard

Complete an animation

Test an animation

Reposition objects at run-time

Plan the presentation of a completed animation project

Lesson 2.13: Correlating Java Variables, Data Types, and Expressions with Alice 3 Tools

5

Topics:

Describing Java variables

Describing Java simple/primitve datatypes

Describing arithmetic operators

Describing relational and logical operators

Describing assignment operators

Practice:

Create an animation to demonstrate the use of variables and simple types

Create an animation to demonstrate the use of arithmetic, relational, and logical operators

Create a Java syntax cheat sheet

Lesson 2.14: Correlating Java Methods, Classes, and Other Structures with Alice 3 Tools

Topics:

Describing a method, class, and instance

Describing a scenario where an if conditional control structure would be used

Describing a scenario where a while loop control structure would be used

Recognizing the syntax for a Java class method as it relates to Alice functions and procedures

Describing input and output

Practice:

Evaluate the Java syntax of a simple animation and define the methods, classes, and instances

Demonstrate the use of an if conditional control structure

Demonstrate the use of a while loop control structure

Correlate Java syntax with animation movements

Add to the Java syntax cheat sheet

Present animation examples for if and while control structures

JF Section 3 Using Greenfoot

Lesson 3.1: Getting Started with Greenfoot

Topics:

Downloading and installing Greenfoot

Describing the components of the Greenfoot interactive development environment

Creating an instance of a class

Describing classes and subclasses

Recognizing Java syntax used to correctly create a subclass

Practice:

Get to know the Greenfoot components

Create instances

Compile and debugging programs

Identify properties of an object

Journal class diagrams and the syntax to correctly create a subclass

Lesson 3.2: Using Methods, Variables, and Parameters

Topics:

Defining parameters and how they are used in methods

Understanding inheritance

Describing properties of an object

Examining the purpose of a variable

Discussing programming concepts and defining terminology

Practice:

Invoke methods

Compile and debug programs

Identify properties of an object

Dissect and journal inheritance concepts

Journal the components of a method

Lesson 3.3: Working with Source Code and Documentation

Topics:

Demonstrating source code changes to invoke methods programmatically

Demonstrating source code changes to write an if decision statement

Describing a method to display object documentation

Practice:

Identify components of the Code editor

Modify source code to turn actors

Modify source code to include a decision

Lesson 3.4: Developing and Testing an Application

Topics:

Demonstrating program testing strategies

Practice:

List steps to developing a software application

Understand documentation and testing

6

Recognizing phases for developing a software application

Design a plan to develop a game

Concept summary and terminology review

Lesson 3.5: Using Randomization and Understanding Dot Notation and Constructors

Topics:

Creating randomized behaviors

Defining comparison operators

Creating if-else control statements

Creating an instance of a class

Recognizing and describing dot notation

Practice:

List and describe the comparison operators

Examine and modify a constructor

Create randomized actor behavior using comparison operators

Create instances of a class

Lesson 3.6: Defining Methods

Topics:

Describing effective placement of methods in a super or subclass

Simplifying programming by creating and calling defined methods

Practice:

Examine and simplify programming by creating and calling defined methods

Lesson 3.7: Using Sound and Keyboard Control

Topics:

Writing programming statements to include sound in a program

Writing programming statements to include keyboard movements in a program

Practice:

Enhance programs with sound and keyboard movement evnets

Lesson 3.8: Creating a World, Animating Actors, and Ending a Game

Topics:

Constructing a world object using a constructor method

Creating an object using a constructor

Writing programming statements to use the new keyword

Defining the purpose and syntax of a variable

Recognizing the syntax to define and test variables

Writing programming statements to switch between two images

Writing programming statements to end a game

Practice:

Create a world constructor method

Image animation

End a game

Concept and terminology review

Journal world creation and variable uses

Create a flash card game in Greenfoot to study Java fundamentals vocabulary terms

Lesson 3.9: Understanding Abstraction

Topics:

Defining abstraction and provide an example of when it is used

Practice:

Actor abstraction

Journal abstraction

Lesson 3.10: Using Loops, Variables, and Strings

Topics:

Creating a while loop in a constructor to build a world

Describing an infinite loop and how to prevent one from occurring

Using an array to store multiple variables used to create a world

Practice:

Create a world constructor method with sound and keyboard input

Use loops and arrays

Demonstrate the use of variable scope in a program

Journal while loops and arrays

7

Creating an expression using logic operators

Describing the scope of a local variable in a method

Using string variables to store and concatenate strings

Lesson 3.11: Putting it All Together with Greenfoot

Topics:

Applying Greenfoot knowledge by creating a Java game

Practice:

Create a Java BlackJack (“21”) card game

Lesson 3.12: Creating an Inventory of Java Fundamentals

Topics:

Creating an inventory of Java fundamentals

Designing a project plan

Practice:

Create a table of Java programming terminology and definitions

Create and label all known Java programming constructs and syntax

Write a project plan to design, implement, and test a game created in Java

JF Section 4: Using Eclipse

Lesson 4.1: Compiling with Eclipse – A First Program

Topics:

Identifying components of Eclipse

Identifying components of a Java application

Compiling an application

Testing to ensure application is complete

Writing the code for GalToLit.java

Modifying a program to execute error free

Modifying a program to use a formula to convert units of measure

Practice:

Compile, debug, and execute a Java application

Write a Java program to convert gallons to liters

Write a Java program to convert Celsius to Fahrenheit

Enhance a Java program for converting values

Add syntax information to the journal

Lesson 4.2: Using Object Classes and Driver Classes

Topics:

Describing the general form of a Java program

Describing the difference between an Object class and a Driver class

Accessing a minimum of two Java class APIs

Explaining and giving examples of Java keywords

Creating an Object class

Creating a Driver class

Practice:

Analyze a problem and write pseudo code in the general form of a Java program

Write Java code and identify keywords used

Create an Object Class Java program

Create a Driver Class Java program

Add components from the Java API to a program

Lesson 4.3: Programming with Data Types and Operators

Topics:

Using primitive data types in Java code

Specifying literals for the primitive types and for Strings

Demonstrating how to initialize variables

Describing the scope rules of a method

Recognizing when an expression requires a type conversion

Applying casting in Java code

Using arithmetic operators

Practice:

Present facts about primitive Java datatype variables and how they are used

Create and initialize Java primitive variables

Create and initialize Java String variables

Demonstrate promotion and type casting

Create Java code with relational and conditional operators

Create Java code with Math and String methods from the Java API

8

Using the assignment operator

Using a method from the Math class

Accessing a Math class method from the Java API

Navigate the Java API

Lesson 4.4: Using Strings

Topics:

Instantiating (creating) a String

Describing what happens when a String is modified

Using the + and += operators for concatenating Strings

Interpreting escape sequences in String literals

Recognizing the difference between a String and a primitive char data type

Testing Strings with the compareTo() and equals() method

Describing why the == operator does not always work when testing String equality

Using String methods length(), substring(), indexOf(), and charAt()

Practice:

Declare a String object

Instantiate and manipulate a String object

Compare String objects

Concatenate String objects

Compare composition of String objects in multiple ways

Compare String values and String Objects

Use String methods from the Java API

JF Section 5: Using Control Statements, Classes, Objects, and Methods

Lesson 5.1: Using Scanner and Conditional Statements

Topics:

Using Scanner for user input during program execution

Using if-else logic and statements

Applying switch logic and statements in Java code

Using break and default effectively in a switch statement

Using the ternary operator

Practice:

Write Java code to demonstrate if and if-else logic

Write Java code to demonstrate switch and break statements

Write Java code to accept user input using Scanner

Use Scanner methods from the Java API

Use the ternary operator

Lesson 5.2: Using Program Control Statements

Topics:

Creating a while loop

Creating a do-while loop

Creating a for loop

Using break and continue in loops

Practice:

Identify examples of when to use looping constructs

Write Java code to demonstrate break and continue

Use pre-test and post-test loops in Java

Use conditional and counting loops

JF Section 6: Using Arrays and Strings

Lesson 6.1: Using Arrays

Topics:

Writing a single-dimensional array in a Java program using primitive data types

Writing a single-dimensional array in a Java program using reference (Object) types

Writing a 2-dimensional array in a Java program using primitive data types

Writing a 2-dimensional array in a Java program using reference (Object) types

Declaring an array, initialize an array, and traverse the array

Describing array initialization

Practice:

Declare, initialize, and traverse one-dimensional arrays with both primitive and reference types

Declare, initialize, and traverse two-dimensional arrays with both primitive and reference types

Use command line arguments

Write programs to store integers into an array, perform mathematical calculations, and display the results

Write programs to store objects, including Strings

Traverse the elements in any array type

9

Distinguishing between the String method length() and an array's length value

Rewriting a Java program to store integers into an array, perform a mathematical calculation, and display the result

Using alternative array declaration syntax

Lesson 6.2: Sorting and Searching

Topics:

Recognizing the sort order of primitive types and objects

Tracing and writing code to perform a simple Bubble Sort of integers

Tracing and writing code to perform a Selection Sort of integers

Tracing and writing code to perform a Binary Search of integers

Comparing and contrasting search and sort algorithms: bubble sort, selection sort, insertion sort, merge sort, and quick sort.

Analyzing the Big-O for various sort algorithms: bubble sort, selection sort, insertion sort, merge sort, and quick sort.

Practice:

Write programs using Linear and Binary searches of primitive datatypes

Write programs using Linear and Binary searches of object datatypes

Describe how to determine the sort order of primitive and object datatypes

Write programs using various Sort algorithms for arrays

Compare and contrast the search and sort algorithms to determine the efficiency of each

Use Big-O notation to describe the efficiency of search and sort algorithms

Explain the importance of algorithm efficiency as it relates to Big-O notation

Lesson 6.3: Handling Errors

Topics:

Overview of handling errors

Propagation of exceptions

Multiple exceptions and errors

Practice:

Create an illustration describing errors and how they are handled

Write code to demonstrate the implementation of an exception

Add syntax examples to the journal

JF Section 7: Using Recursion, Abstraction, and Inheritance

Lesson 7.1: Passing Objects and Overloading Methods

Topics:

Recognizing the correct general form of a class

Creating an object of a class

Creating methods that compile with no errors

Returning a value from a method

Using parameters in a method

Creating a driver class and add instances of Object classes

Adding a constructor to a class

Applying the new operator

Describing garbage collection and finalizers

Applying the this reference

Adding a constructor to initialize a value

Practice:

Create a class

Create and use constructors

Create methods with parameters and return values

Create constructors to work with random values to create a card and determine its point value

Apply the new operator and the this reference

Work with examples of garbage collection and finalizers in programs

Lesson 7.2: Passing Objects and Overloading Methods

Topics:

Public and private access

Passing and returning objects to and from methods

Overloading constructors and methods

Practice:

Model inheritance and describe public and private access

Visually demonstrate passing and returning objects to and from methods

Write Java code using arrays and overloaded methods

Add syntax examples to the journal

10

Lesson 7.3: Understanding Recursion, the Static Modifier, and Nested Classes

Topics:

Using a linear and non-linear recursive methods

Using the static modifier for classes, methods, and variables

Practice:

Demonstrate recursion and create a recursive method

Use the static modifier in a Java program for classes, methods, and variables

Use a static block in Java code

Lesson 7.4: Understanding Inheritance

Topics:

Class hierarchies and inheritance

Superclass references

Using applets to demonstrate inheritance

Practice:

Describe how to draw UML class diagrams

Explain attributes, methods (operations), and relationships in UML

Explain visibility – public, protected, default, and private

Build models of class hierarchies

Describe the benefits of inheritance

Use superclass references

Use an applet to demonstrate inheritance

Lesson 7.5: Understanding Polymorphism

Topics:

Review of inheritance

Working with superclasses and subclasses

Polymorphism and overriding methods

Creating interfaces

Understanding the object model

Practice:

Change the reference type of an object

Implement interfaces

Write a program to override methods from the Object class

Describe object class importance

Add syntax examples to the journal

Semester 2: Oracle Academy Java Programming (JP)

JP Section 1: Java Application Deployment

Lesson 1.1: Deploying an Application

Topics:

Using packages

JAR’s and deployment

Two-tier architecture

Application modification and enhancement

Practice:

Create a design that uses packages to organize related classes

Create JARs and set the main class

Describe Two-tier architectures

Create syntax examples for the journal

JP Section 2: Working with Pre-Written Code

Lesson 2.1: Working with Pre-Written Code

Topics:

Reading and understand a pre-written Java program consisting of classes and interacting objects

Applying the concept of inheritance in the solutions of problems

Testing classes in isolation

Describing when it is more appropriate to use an ArrayList than an Array

Practice:

Examine the code in JavaBankArrayList to see how to declare and use the ArrayList Accounts

Examine the code in JavaBankArrayList to see how the code for creating an account has changed by using an ArrayList

Examine the code in JavaBankArrayList to see how the code for making a deposit or withdrawal is used

Amend the JavaBankArrayList program to delete an account using the remove operation

Amend the JavaBankArrayList program to delete an account using the remove operation

Unit test your new code

11

JP Section 3: Class Design, Generics, Strings, and Exceptions

Lesson 3.1: Java Class Design

Topics:

Access levels

Instance of and virtual method invocation

Casting and overriding methods

Practice:

Use instance of and virtual method invocation

Use virtual methods and casting

Write syntax examples for the journal

Lesson 3.2: Generics and Collections

Topics:

Generic classes

Creating collections

Using ArrayList, Set, and HashMap

Implementing a stack

Using enumerated types

Practice:

Create generic classes

Create collections with and without generics

Use ArrayList, Set, and HashMap

Implement a stack and using enumerated types

Create syntax examples for the Journal

Lesson 3.3: String Processing

Topics:

Searching, parsing, and creating strings

Using regular expressions to search, parse, and replace strings

Practice:

Use StringBuilder to create strings

Modify Java code to search, parse, and replace strings

Lesson 3.4: Exceptions and Assertions

Topics:

Exception handling

Recognizing exception classes and categories

Creating custom exceptions

Testing invariants

Practice:

Demonstrate multiple ways to code exception handling

Identify common exception classes

Write code to create custom exceptions

Create syntax examples for the journal

Lesson 3.5: Input/output Fundamentals

Topics:

Basics of input and output

Reading and writing data, files, and objects

Practice:

Create a Java program to read and write data

Create a Java program to read and write files using streams

Create a Java program to read and write objects

JP Section 4: Creating a Final Project

Lesson 4.1: Final Project and Presentation

Topics:

Getting started on the final project

Presentation essentials

Project documentation essentials

Practice:

Project analysis, design, and development, and test

Develop a final project presentation

Document the final project

Appendix A: Self-study Guides

Appendix B: A SQL Primer

Appendix C: Preparation for the US AP Exam

12

Correlation to AP Topic Outline

I. Object-Oriented Program Design

A. Program design

1. Read and understand a problem description, purpose, and goals. JF2, JF3, JP4

2. Apply data abstraction and encapsulation. JP7

3. Read and understand class specifications and relationships among the classes (“is-a,” “has-a” relationships).

JP7

4. Understand and implement a given class hierarchy. JP7

5. Identify reusable components from existing code using classes and class libraries. JP2,

B. Class design JP3.1

1. Design and implement a class. JP3.1

2. Choose appropriate data representation and algorithms. JP3

3. Apply functional decomposition. JF2, JF3

4. Extend a given class using inheritance. JF7.4

II. Program Implementation

A. Implementation techniques

1. Methodology

a. Object-oriented development JF7

b. Top-down development JF2 through JF7

c. Encapsulation and information hiding JF7

d. Procedural abstraction JF2 through JF7

B. Programming constructs

1. Primitive types vs. objects JF4.2, JF4.3,JF7.1

2. Declaration

a. Constant declarations JF7.3

b. Variable declarations JF2.4, JF4.3

c. Class declarations JF2, JF3, JF4.2, JF7.1, JF7.2

d. Interface declarations JP2

e. Method declarations JF4.3, JF5.2, JF7.2

13

f. Parameter declarations JF5.2, JF7.1, JF7.2, JF7.4

3. Console output (System.out.print/println) JF3.5, JF4.1

4. Control

a. Methods JF7.1

b. Sequential JF3 & JF4

c. Conditional JF5.2

d. Iteration JF5.2

e. Understand and evaluate recursive methods JF7.3, JF7.4

C. Java library classes (included in the AP Java subset) JF4.3, JF4.4

III. Program Analysis

A. Testing

1. Test classes and libraries in isolation. JP2 ,

2. Identify boundary cases and generate appropriate test data. JP2 ,

3. Perform integration testing. JP2 ,

B. Debugging

1. Categorize errors: compile-time, run-time, logic. JF6.3

2. Identify and correct errors. JF2, JF3

3. Employ techniques such as using a debugger, adding extra output statements, or hand-tracing code.

JF2, JF3

C. Extend existing code using inheritance JF3.1, JF7

D. Understand error handling

1. Understand runtime exceptions. JF4, JF6

E. Reason about programs

1. Pre- and post-conditions JF2

2. Assertions JF2

F. Analysis of algorithms

1. Informal comparisons of running times JF6.2

2. Exact calculation of statement execution counts JF6.2

G. Numerical representations and limits

1. Representations of numbers in different bases

14

2. Limitations of finite representations (e.g., integer bounds, imprecision of floating-point representations, and round-off error)

IV. Data structures

A. Simple data types (int, boolean, double) JF4.3

B. Classes JF4.3, JF7.1

C. Lists JP3.2

D. Arrays JF6.1

V. Standard Algorithms

A. Operations on data structures previously listed

1. Traversals JF6.1, JP3.2

2. Insertions JF6.1, JP3.2

3. Deletions JF6.1, JP3.2

B. Searching

1. Sequential JF6.2

2. Binary JF6.2

C. Sorting

1. Selection JF6.2

2. Insertion JF6.2

3. Mergesort JF6.2

VI. Computing in Context

A. System reliability JF1.2

B. Privacy JF1.2

C. Legal issues and intellectual property JF1.2

D. Social and ethical ramifications of computer use JF1.2