AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities The classroom is set up like a traditional classroom on the left side of the room. This is where I will conduct my lectures and the students will take notes and also take their paper-based quizzes and tests. The right side of the classroom houses the computers in a U-shaped configuration. This is where the students will conduct their labs. I believe this classroom arrangement is conducive to a productive learning environment, since students are not distracted with computer work during my lectures. Students use the computer on average three times per week. The internal computer support staff work very hard to maintain a 100 percent up-time for the computers. Students can schedule other times to work on their assignments on these computers as necessary. Texts and Resources 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 Wittry, Dave. Teacher resources for Karel J Robot http://www.apcomputerscience.com/ The information on this site is licensed under a Creative Commons Attribution Non-Commercial license. I give credit for the material when I use it in my classroom. GridWorld Case Study. The College Board, 2006. Horstmann, Cay. Java Concepts. Copyright John Wiley and Sons, Inc, 2008. http://www.wiley.com Syllabus at a Glance General Topic Week Karel J. Robot 1-7 Java Basics, Introduction to Classes and OOP, Strings 8-11 Arrays and Array Lists 12-13 Interfaces, Polymorphism, Inheritance 14-16 GridWorld Case Study Part 1 (Intro) 17-18 GridWorld Case Study Part 2 (Bug variations) 19-20 Array Sorting, Searching, Insertions, and Recursion 21-22 GridWorld Case Study Part 3 (Classes and interfaces) 23-24 GridWorld Case Study Part 4 (Critters) 25-26 Page 1 of 10
Review for AP Exam 27-29 AP Exam 30 Computer Science Project 31-34 Course Outline [C2] Weeks 1-7 Introduction to the principal concepts of computer science using Karel J. Robot. Objectives [C4] [C5] Become familiar with the computer lab, accounts, and an IDE (eclipse). Understand object-oriented programming and top-down design/refinement of individual tasks. Understand basic class structure including instance variables, local variables, parameter passing, scope, public/private visibility, use of super. Learn sequence, selection, and iteration techniques. Be exposed to recursion. Understand inheritance, polymorphism, and overriding methods. Use java.lang.math.random(), RandNumGenerator. Analyze, design, code, and test software. Determine error categorization/correction. Become familiar with computer science terminology. My teaching philosophy is to use a spiral approach to make sure that students understand computer science concepts. I will start with simpler concepts, which they will visualize and then I will gradually introduce more complicated topics. The result is that the students will build on their understanding as they absorb these new concepts and improve their computer programs. Imagination is greatly encouraged. I will use a variety of examples to explain computer science concepts in an understandable fashion. My students will be able to learn from their mistakes as they test their program modifications. My overall goal is to make the class enjoyable and informative, so that the students thoroughly understand the concepts of computer science. Karel J. Robot, Chapters 1-8. Sections of lecture materials from the www.apcomputerscience.com website. Page 2 of 10
Selected exercises from Chapter 1-8 of Karel J Robot. Create HBot class to create the letter H from beepers. Have the students compose various improvements to make the program more object oriented. Build on basic programs to show object-oriented programming techniques. Sections of homework assignments from the www.apcomputerscience.com website. Weeks 8-11 Java Basics, Introduction to Classes and OOP, Strings Objectives [C6] [C8] Source, bytecode, compilers, interpreters, Java virtual machine, platform independence Understand computer ethics Have knowledge of computer software and hardware components, operating systems Learn to use basic input and output (Scanner class and System.out.println) Understand primitive data types Demonstrate the assignment statement Understand arithmetic operators, ArithmeticException error, precedence, casting/promotion Use java.lang.math (abs, pow, sqrt, random) static methods Understand parameter passing terminology and concepts Learn about String class, concatenation, length method, object references Be able to program using iteration logic (if/else, while, for statements) Understand objects, classes (subsclasses, superclasses, interfaces), and methods Use programming syntax conventions (camel case, indentions, comments, etc.) Understand the following terminology: constructor, accessor method, mutator method, instance variable, data encapsulation, information hiding, and procedural abstraction Understand the difference between public and private access in a class Write classes from scratch, choosing appropriate data representation Understand how to declare a method and declare parameters in that method Page 3 of 10
Understand the use of preconditions, postconditions and assertions when designing methods Understand the difference between OOP development and topdown development I will give a general overview of computer hardware, networks and software. Computer ethics will also be discussed and we will talk about the school s acceptable use policy, then go to the Web and look at the ACM s code of ethics. An assortment of programs will be assigned to the students to demonstrate the various Java basic concepts. Whenever appropriate, we will build from simple programs and modify them as different topics are discussed. Programming conventions will be stressed and labs will be a primary learning tool during this section. Iteration logic will be introduced. Java Concepts, Chapters 3, 4, 5, 6. Students are given a program that draws a sequence of differently colored rectangles and they are asked to modify the code so that the result will be a sequence of rectangles that gradually changes in color from the color of the first to the color of the last. The algorithm to blend the correct color for each rectangle requires the students to use proportions based on the distance each rectangle is from the first and last rectangles. Java Concepts, selected exercises and labs from chapters 1-7 Weeks 12-13 Arrays and Array Lists Objectives [C6] [C8] Understand the usage of arrays Understand the usage of array lists and the differences between arrays and array lists Use the enhanced for loop Design simple array algorithms Understand how to declare, construct, initialize, and index arrays/arraylist Learn how to store primitives and objects in arrays/arraylist Understand how to traverse, insert, and delete array/arraylist elements Show how to pass arrays and ArrayLists to methods Page 4 of 10
Understand Wrapper classes Double, Integer Understand the concepts of casting, ClassCastException, ArrayIndexOutOfBoundsException Demonstrate two-dimensional arrays and how to copy arrays The usage and syntax of arrays and array lists will be demonstrated and discussed in the classroom. Students will be given progressively more complicated programming assignments to build on their knowledge of defining arrays, populating arrays, and then manipulating the arrays. Typical class days will be split between lecture and lab work, but will be more heavily focused on hands-on work. I end with Simon. The students program a game; similar to the hand held game that takes repeating and increasing patterns that they have to match. This forces the students to deal with an array of objects. Java Concepts, Chapter 7 Exercises from chapter 7 of Java Concepts. Write a program that measures the frequencies with which each letter of the alphabet occurs in a file. Given a program that draws one equilateral triangle, write a program that draws a Sierpinski gasket (a figure that contains nested triangles). Design a class that models a fraction and arithmetic with rational numbers. Simon - game similar to handheld game with an increasing repeating pattern Weeks 14-16 Interfaces, Polymorphism, Inheritance Objectives [C6] [C8] Understand Interfaces and how they are used for code reuse Be able to convert between class and interface types Explain the concept of polymorphism Give an introduction to Inheritance Construct a subclass Convert between subclass and superclass types Page 5 of 10
Students will be exposed to the object-oriented concepts of interfaces, polymorphism, and inheritance through example programs. By the end of this section, the students will have a clear understanding of the differences between these concepts and will know the most appropriate situations in which to use them. The overriding teaching strategy for this unit will be the demonstration of classes and having the students learn by writing/improving their programs. Java Concepts, Chapter 9, 10. Exercises from chapter 9-10 of Java Concepts. Weeks 17-18 GridWorld Case Study Part 1 (Introduction) Objectives [C3] [C7] [C9] Cover Part 1 of the GridWorld Case Study Run the GridWorld project and discuss the interaction of large classes Understand the Bug class, Runner class, and Grid interface Understand Information hiding Extend the Bug class and create a different actor My strategy is to get the students exposed to the GridWorld case study early in the school year. One of the main goals of this section is to show them the GridWorld classes and explain their relationships to each other. The students will be asked to design some object-oriented programming code and implement it. They will get used to testing the code and gradually gain the confidence in programming techniques. This work will build upon the experience they have with the Karel J. Robot project and the basic Java logic. GridWorld Case Study (required material for the AP Exam) Exercises from Chapter 11 of Java Concepts to reinforce Strings and Files (with Java 5.0 s Scanner class) Page 6 of 10
Weeks 19-20 GridWorld Case Study Part 2 (Bug variations) Objectives [C3] [C4] [C5] Understand intercommunicating objects Learn about Inheritance Use Interfaces (Comparable, Locatable) and Abstract classes Understand array basics Understand data structure design and selection 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. GridWorld Case Study Part 2 Java Concepts, Chapters 5, 6, 7 Exercise sets in Part 2 of the GridWorld Case Study Week 21-22 Array Sorting, Searching, Insertions, and Recursion Objectives [C3] [C4] [C5] Learn about insertion and selection sorts Understand sequential versus binary searching Introduction to some friendly Big-Oh ideas Revisit recursion Page 7 of 10
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. Java Concepts, Chapters 3, 11 Big-Oh handout The xsortlab Applet http://math.hws.edu/tmcm/java/xsortlab Worksheets and sample source code sorting, searching, recursion, counting iterations, analysis Exercises from Chapters 3, 11 of Java Concepts. Weeks 23-26 GridWorld Case Study Part 3 (Classes and Interfaces) and Part 4 (Critters) Objectives [C3] [C4] [C5] [C6] Further understanding of inheritance and polymorphism Refined data structure/algorithm selection and design Feel very comfortable with the Case Study By this point in the year, students have an excellent knowledge of the Java language and object-oriented principles and can dive into these last chapters and have fun. Page 8 of 10
Culminating the year with the Case Study is helpful because it will be fresh in their mind while taking the AP Exam. This is a great time to give students more practice with selecting and designing data structures and algorithms on their own. Within the context of the GridWorld Case Study there are many lab ideas that will help them further hone their data structure and algorithm design skills. The main idea is to have them working within the many classes and to become extremely comfortable with where things are at and how they work. GridWorld Case Study Parts 3 and 4 Java Concepts, Chapters 5, 6, 7 Exercise sets in Part 3 and 4 of the GridWorld Case Study Selected labs for GridWorld Weeks 27 29 Review for AP Exam Objectives Ensure students know what is coming on the AP Exam Earn a 5 on the AP Exam I will make the students aware of what they should expect on a typical AP Exam. They will practice using sample questions. Post-Exam Computer Science Project Objectives Reinforce the concepts learned in this course Design and develop a computer science on their own Each student will select a project on their own, which I will approve. They will design a program, write the code for it, and then demonstrate it to the class. Most of the time during these weeks will be spent in labs. Page 9 of 10
To be determined by the student The assignment will be the approved computer science project itself. Page 10 of 10