AP Computer Science A

Course Syllabus


 

 

 

 

Class Rules:

1.       Respect others (golden rule)
2.       Respect property
3.       Be on time
4.       Be prepared (bring notebook and pen or pencil)
5.       Leave food and drinks outside of the classroom

 

 

Course Objective:

In this class students will learn how to solve problems, create algorithms, write programs in Java, and prepare for the AP Computer Science A Test. Students will learn to program in Java but the process of developing well structured programs will be stressed.  Students will develop critical thinking skills that will better equip them for life-long service to Christ.

 

 

Course of study:

This class will follow the general outline of the following course of study. Students will complete projects both independently and through a team effort.  Outside class time to work on projects will be required.

 

 

 

Weeks

1st Quarter

Transition from Scheme to Java

1-2

 

Karel J. Robot

3-6

 

Java Basics

7–8

2nd Quarter

GridWorld Part 1

9–10

 

GridWorld Part 2

12–13

3rd Quarter

Arrays and ArrayList

14–17

 

Quadratic Sorts and Linear/Binary Search

18–21

4th Quarter

Mergesort

22

 

GridWorld Parts 3 and 4

23–26

 

Review

27–29

 

 

Grading System:

Tests

50%

Classwork and Projects

50%

Total

100%

 

 

Materials Needed:

  • Matthias Felliesen, et al. Online textbook: How to Design Programs: An Introduction to Programming and Computing.
    http://www.htdp.org/   
  • Bergin, Joseph, et al. Karel J. Robot: A Gentle
    Introduction to the Art of Object-Oriented Programming Using Java.
    Copyright Joseph Bergin.
    http://csis.pace.edu/~bergin/KarelJava2ed/Karel++JavaEdition.html
  • GridWorld Case Study. The College Board, 2006.
    http://www.skylight.com

·        Web site: Alice: http://www.alice.org/

·        School Acceptable Use Policy

 

  • Notebook

 

  • Pen or pencil

Make-up Tests/Work:

When a student is absent it is the student’s responsibility to find out what they missed.  (This will be best done by accessing my website.)  They may schedule make-up tests and work by APPOINTMENT.  The library has computers available and a book for those students needing to make up work.

 


 

AP Computer Science A

Course Outline and Details
[c2]

 

Computer Facilities

Our classroom will use a portable laptop cart with wireless access to the network and Internet. Each student will have their own laptop to work on during every class period. We do have a full-time tech staff that does a wonderful job to minimize any downtime. Students do have access to desktop computers and laptops in the library before and after school, as well as, during lunch.

 

Course Outline

 

Weeks 1–2

Transition from Scheme to Java.

Objectives

  • Become familiar with the classroom procedures, computer lab, accounts, and resources
  • Discuss and review the ethical and social responsibilities of computer use and program construction
  • Review and identify major hardware and software components of a computer system, their relation to one another, and the roles of these components within the system
  • Review of Scheme and the HTDP process
  • Write design recipes and programs in scheme using the as a jump off point to review previous concepts learned and begin to get a picture of the difference between Java and Scheme
  • Discuss linear programming versus object oriented programming

 

Teaching Strategies

I will begin by going over our Acceptable Use Policy and a discussion regarding why we have the rules we do. We will conduct a class discussion on the computer safety and social and ethical responsibilities of computer use. In this portion of the class I will help theme learn how to use their previous knowledge of Scheme and the design recipe to transition into Java and object oriented programming.  We will continue to use the design recipe as a design method throughout the remainder of the class.  It provides a method of designing and structuring programs that is language independent.

 

References/Readings/Assignments

 

  • Read and work through programs in Section 12 from Matthias Felliesen, et al. Online textbook: http://www.htdp.org/  How to Design Programs: An Introduction to Programming and Computing.
  • Read and discuss school Acceptable Use Policy (which covers Internet safety, ethics, and
  • PowerPoint Lecture of basic computer hardware and software components

 

Weeks 3–6

Introduction to the principal concepts in computer science using Karel J. Robot.

Objectives [C4] [C5]

  • Become familiar with the an IDE
  • Understand object-oriented programming and top-down design/refinement of individual tasks
  • Basic class structure including instance variables, local variables, parameter passing, scope, public/private visibility, use of super
  • Sequence, selection, and iteration
  • Recursion
  • Inheritance and polymorphism, overriding methods
  • java.lang.Math.random(), RandNumGenerator
  • Analyze, design, code, and test software
  • Error categorization/correction

 

Teaching Strategies

I teach computer science concepts so that students have immediate visual feedback—at least in the beginning. They will truly understand what they have done right and wrong because they can see it. Students should not lose sight of computer science as they examine the details of the computer language. This undertaking is not too difficult since algorithms that solve a variety of robot tasks are both plentiful and provocative, as are the topics of study associated with them. I emphasize for creativity and imagination to be their guides. My goal for students is to be enjoying computer science at the level that it is most inspiring—the conceptual level.

 

References/Readings

Karel J. Robot and many other related ideas at the author’s site. http://csis.pace.edu/~bergin/KarelJava2ed/Karel++JavaEdition.html

Java Methods A & AB, selected readings from Chapters 2, 7, and 8

Sample daily schedule, PowerPoint presentations, homework, labs, and review exercises http://www.apcomputerscience.com

Assignments/Labs

  • See the daily schedule, which includes homework assignments, labs, review exercises, PowerPoint presentations, and tests. www.apcomputerscience.com

 

Weeks 8–10

Java basics

Objectives [C6] [C8]

  • Source, bytecode, compilers, interpreters, Java virtual machine, platform independence
  • Computer software and hardware components, operating systems
  • Basic logic gates(optional) and computer numbering systems
  • Assignment statement, primitive data types
  • Arithmetic operators, ArithmeticException, precedence, casting/promotion
  • java.lang.Math (abs, pow, sqrt, random), static methods
  • Parameter passing terminology and concepts
  • String class, object references, aliasing
  • Selection in more detail
  • Object is the superclass of all superclasses, overriding toString()
  • Interfaces

 

Teaching Strategies

Classroom discussions on topics of processors, peripherals, and system software are ongoing throughout the course. Students discuss and identify major components and how they interact. They will become familiar with the operations of the hardware and software available in our school and be able to distinguish between a single-user system and a network. It is expected that all students will adhere to the Acceptable Users’ Policy given by our district. I introduce interfaces by providing one for students and having them write a couple of classes that implement the interface. In this manner, I am giving their lab/class its basic structure, providing a lab specification, especially if it contains Javadoc. It’s also a way to automate testing their labs. I am guaranteeing that the students' classes all have the same method signatures, enabling to easily test all of their methods.

References/Readings

Java Methods A and AB, Chapters 1, 3, 5, 6, and 7

Jamtester, JUnit, and unit testing www.jamtester.com

Assignments/Labs

  • Java Methods A and AB, selected exercises and labs from chapters 1, 3, 5, 6, and 7
  • Polygon lab with unit testing

 

Weeks 11-12

Introduction to the GridWorld Case Study

Objectives [C3] [C7] [C9]

  • Part 1 of GridWorld Case Study
  • Creating projects and running the GridWorld Case Study
  • Black-box testing
  • Computer ethics and social implications

 

Teaching Strategies

The GridWorld Case Study can be sliced into byte-sized pieces by incorporating some of the classes as early as possible in the course. I don’t initially tell the students that the Case Study exists, I simply make them comfortable using libraries and objects and writing and designing object-oriented code. As they are mastering these tasks, they are also mastering important AP concepts. This subtle instruction of AP topics is relatively painfree for the students, who will remain happily oblivious to a task that they might have otherwise perceived as difficult. I require that the lab be fault-tolerant, that is, handle incorrect data entered by the user, so I give them additional practice with selection, iteration, and string and primitive comparisons and conversions.

A good place to begin talking about computer ethics is when we begin the case study. The students will immediately notice that each source file contains a statement referring to GNU licensing. From there I introduce them to both the ACM and IEEE and their published Codes of Ethics. Dr. Jody Paul has an excellent site listing many links that will help to facilitate thought and discussion among teachers and students.

References/Readings

GridWorld Case Study (required material for the AP Exam)

Dr. Jody Paul www.jodypaul.com/SWE/ethics.html

Assignments/Labs

  • Java Methods A & AB, Chapter 10 (Strings) and Chapter 14 (Streams and Files—with Java 5.0’s new Scanner class)

 

Weeks 13–15

GridWorld Part 2

Objectives [C3] [C4] [C5]

  • Intercommunicating objects
  • Inheritance
  • Interfaces (Comparable, Locatable) and Abstract classes
  • Array basics
  • Data structure design and selection

 

Teaching Strategies

In order for the students to get a grasp on how the objects communicate with one another, I facilitate a scripted role-playing exercise. This is an effective way to enable students to see the big picture without looking at too much code. Seeing and acting out the object responsibilities will help students internalize the complex intercommunication. I like to be creative and let everyone have fun with it. Professor Levine shows how to use role-plays.

 

References/Readings

GridWorld Part 2

Java Methods A & AB, Chapters 9 and 11

Assignments/Labs

  • Exercise sets in Part 2 of the GridWorld Case Study

Weeks 16-18

Arrays and ArrayList

Objectives [C3] [C4] [C5] [C6]

            Declaring, constructing, initializing, and indexing arrays/ArrayList

            Storing primitives and objects in arrays/ArrayList

            Traversing, inserting, deleting array/ArrayList elements

            Passing arrays/ArrayList to methods

            Wrapper classes—Double, Integer

            Casting, ClassCastException, ArrayIndexOutOfBoundsException

            Java 5.0's Generics

            Java 5.0's enhanced for loop

 

Teaching Strategies

Students took a quick look at arrays in the last section while working with Parts 2 and 3 of the GridWorld Case Study. Now we go into it in depth. The first few labs in this section are small and focused, used for practicing simple array traversals, insertions, and deletions. I keep it simple at this point and not embed array concepts within too many object-oriented concepts. Afterward, I then introduce them to some object-oriented GUI labs to give them even more practice with arrays and ArrayLists.

References/Readings

Java Methods A & AB, Chapter 12

Assignments/Labs

  • Misc Array Methods lab, Mode and Histogram lab (based on 2000 AP exam question)
  • Java Methods A & AB, Chapter 12 exercises and labs

 

Weeks 19–21

Quadratic Sorts and Linear/Binary Searching

Objectives [C3] [C4] [C5]

  • Insertion and selection sorts
  • Sequential versus binary searching
  • Introduction to some friendly Big-Oh ideas
  • Recursion revisited

 

Teaching Strategies

While working with the traditional sorts and searches, I introduce some simple Big-Oh concepts and counting. Big-Oh is not part of the AP CS A Exam, but the counting of statements being executed is a part. I have the students count comparisons done while sorting and then graph the results. We discover why comparisons/operations relevant to the dataset size are used as a benchmark as opposed to execution speed. I also use the algorithms that they have studied up to now (e.g., reading data, common array algorithms) into their respective Big-Oh family.

This is a good place to work recursion back into the course, since I we can explore further how the linear and binary searches can be written both iteratively and recursively.

References/Readings

Java Methods A & AB, Chapters 4 and 13

Big-Oh handout

The xSortLab Applet http://math.hws.edu/TMCM/java/xSortLab

Assignments/Labs

  • Worksheets and sample source code—sorting, searching, recursion, counting iterations, analysis
  • Java Methods A & AB, Chapters 4 and 13 for lab ideas

 

Week 22

Mergesort

Objectives [C3] [C4] [C5] [C6]

  • Mergesort
  • Recursion
  • java.util.Arrays and java.util.Collections

 

Teaching Strategies

Students will gain additional practice with arrays as they explore the nontrivial task of merging two sorted lists. In addition, students will once again see a comparison between a recursive and nonrecursive solution to an algorithm. Now that the students have had a chance to play with all of the sorts and searches in the AP curriculum, I like to introduce them to two more powerful and fun classes, java.util.Arrays and java.util.Collections. By this time in the course the students are quite adept at reading an API; this gives them a bit more practice.

References/Readings

Java Methods A & AB, Chapter 13

Assignments/Labs

  • Java Methods A & AB, Chapter 13 exercises and labs