AP® Computer Science AB

advertisement
AP® Computer Science A
Mrs. Crystal L. Furman
Pre – requisite Course: Java Programming:
Students taking AP Computer Science are required to take Java Programming. In this course a unit is spent
on An Introduction to Computers. This unit includes an introduction to Desktop Computing, Operating
Systems, Mobile Computing, Programming Languages, Networks, Number Systems, including Binary and
Hexadecimal, Data Storage, Internet, Internet Privacy Issues, Internet Acceptable Use Policy, and Social
and Ethical Implications of Computer Use. At the conclusion of this course, students are expected to know
and use variables, constants, iteration, control statements, output, method use, method development,
parameters, access specifiers, method overloading, return values, pre and post conditions, Strings, Math
Class, instantiation of objects, class constructors, design and implement a class, some inheritance and
polymorphism, Arrays, and ArrayList. Reference: Brown, Beth, A Guide to Programming in Java,
Lawerenceville Press, 2005. CR8, CR9
Overview: CR8, CR9
This course provides students an opportunity to further develop and refine their programming skills. We
will continue our study of programming and further explore the lab’s hardware, software and network
components. Students will have the benefit of keeping current with social changes and ethical practices
that impact the field of computer science through current event articles and discussions. In particular,
the emphasis of this course is on the organization of information; the implementation of common data
structures such as lists, and techniques of data abstraction, including encapsulation and inheritance.
Students also explore recursion and the close relationship between data structures and algorithms. Handson programming is a central component of this course. Programming assignments will require time spent
in class as well as preparation time outside of class. At the conclusion of this course, students will
understand common data structures and algorithms and be able to apply that understanding to
implementing new data abstractions and using existing library components. Students will be stronger
programmers and feel comfortable programming in Java.
Assignments
Students are expected to do three types of assignments. The first are reading assignments from the textbook
and the GridWorld Case Study. Based on readings and lectures, students will have various written
assignments. Students will be expected to come to class prepared to present solutions or participate in
discussions based on their written assignment questions. Programming projects will be complete programs
that students are expected to design, implement, and document on their own or with a partner. Students
will be expected to complete the design portion outside of class, and present it to the teacher for approval,
this will be 25% of the project grade. Tests will be given at the conclusion of each unit. Tests will model
the AP exam, with a portion of multiple choice questions and a free response question. Students will be
provided the AP Computer Science Quick Reference Guide on all tests and quizzes.
In this course lab time will be provided for students to work on programming projects.
Resources
 Horstman, Cay, AP Edition Java Concepts, Wiley, 2005
 The AP® Computer Science GridWorld Case Study
 AP® Computer Science Quick Reference Guide
CR2- The course includes all of the topics
listed in the “Computer Science A” columns
of the Topic Outline in the AP Computer
Science Course Description.
CR3- The course teaches students to design
and implement computer-based solutions to
problems in a variety of application areas
Unit 1: CR2, CR3, CR4, CR7
• Review of Java Basics
o primitive data vs. classes
o constants, variables, parameters
o assignments, algebraic expressions
o String Class, Math Class
o Input, Output
o formatting output
o method calling
Reading/Exercises: Java Concepts Chapter 2: Using Objects; Java
Concepts Chapter 4: Fundamental Data Types;Worksheets and
Exercises
Project: Hello World, Formatting Output, Amy’s Garden Emporium
Test: Multiple Choice and Free Response
Unit 2: CR2, CR3, CR4, CR7
• Decision making
o boolean expressions
o conditionals
o comparable
Reading/Exercises: Java Concepts Chapter 6: Decisions; Worksheets;
Exercises from the chapter.
Project: Grade Converter. Project 6.1: Combination Lock
Test: Multiple Choice and Free Response
Unit 3: CR2, CR3, CR4, CR7
• Iterations
o for loops
o while loops
Reading/Exercises: Java Concepts Chapter 7: Iteration; Worksheets;
Exercises
Project: Grade book
Test: Multiple Choice and Free Response
Unit 4: CR2, CR3, CR4, CR7
• Classes and Methods
o method writing, method calling
o formal and actual parameters
o return types
o access specifiers - private, public, protected
o method signature
o classes, encapsulation, inheritance, polymorphism, abstract data types
o Conditional, Sequential, Iterations
o Decompose into classes
o Dynamic Binding, is-a, has-a
o interfaces
o Interacting Classes
Reading/Exercises: Java Concepts Chapter 3: Implementing Classes;
Java Concepts Chapter 9 Designing Classes; Java Concepts Chapter 11
Interfaces and Polymorphism; Java Concepts Chapter 13 Inheritance /
Worksheets and Exercises
Project: Project 11.2: Design a game interface; Comic Strip
Test: Multiple Choice and Free Response
Unit 5: CR2, CR3, CR4, CR7
• Review of Java and OOP through exploration of the GridWorld Case
Study Parts 1 – 2
o Method Structure, Parameters
o Language Features
o Constant, Variable, Parameter
o Iterations
o Conditional
o JavaDocs, Specifications, Pre/PostConditions
o Classes, Encapsulation, Abstract Data Types,
Decompostion, Inheritance, Polymorphism
o Object, Comparable, String, Double, Integer, and Math
Classes
o Number Representation – round-off error
o Debugging
 What are Data Structures? What are Algorithms?
Reading/Exercises: Java Concepts Chapter 2 Using Objects/
Worksheets and Exercises, GridWorld Case Study Parts 1 and 2,
completion of question sets and exercises
Project: Circle Bug, Spiral Bug, Z-Bug, Original Bug Pattern
Test: Multiple Choice and Free Response
Unit 6: CR2, CR3, CR4, CR5, CR6
• Arrays and ArrayLists
o Review of Linear Traversal Patterns
• Iterator
• Two – dimensional Arrays
• Sequential and Binary Search
Reading/Exercises: Java Concepts Chapter 8 Arrays and Array Lists /
Worksheets and Exercises
Project: Alphabetical Name List, Exercise P8.18 Magic Squares
Test: Multiple Choice and Free Response
Unit 7: CR2, CR3, CR6, CR7
• Parts 3 - 4 of the GridWorld Case Study
• More Interfaces
• Exception Handling /
Reading: Java Concepts Chapter 15 Exception Handling / Worksheets
and Exercises; GridWorld Case Study Parts 3 and 4, completion of
question sets, exercises and group activities.
Project: Group project to create Jumper Class / Group project to
extend Critter Class.
Test: Multiple Choice and Free Response
Unit 8: CR2, CR3, CR4, CR6
• Recursion
• Recursion Sorting Algorithms
Reading: Java Concepts Chapter 18 Recursion; Worksheets; Exercises
Project: Subdivided Squares and Other Polygons
Test: Multiple Choice and Free Response
CR4- The course teaches students to use and
implement commonly used algorithms and
data structures.
CR5- The course teaches students to develop
and select appropriate algorithms and data
structures to solve problems.
CR6- The course teaches students to code
fluently in an object-oriented paradigm using
the programming language Java. The course
teaches students to use standard Java library
classes from the AP Java subset delineated in
Appendixes A and C of the AP Computer
Science Course Description.
CR7- The course teaches students to read
and understand a large program consisting of
several classes and interacting objects, and
enables students to read and understand the
current AP Computer Science Case Study
posted on AP Central
CR8- The course teaches students to identify
the major hardware and software
components of a computer system, their
relationship to one another, and the roles of
these components within the system.
CR9- The course teaches students to
recognize the ethical and social implications
of computer use.
Unit 9: CR2, CR3, CR4, CR5, CR6
•Analysis: Worst/Average Case
• Sorts and Search
o Mergesort, Insertion, Selection, Sequential and Binary
Reading: Java Concepts Chapter 19 Sorting and Searching /
Worksheets and Exercises
Project: Project 19.1 Appointment Book
Test: Multiple Choice and Free Response
Unit 10: CR2, CR3, CR4, CR5, CR6
• Linked Lists (Client View)
• Linked Lists, Doubly Linked Lists (Implementation), Circular Lists
Reading: Java Concepts Chapter 20 An Introduction to Data
Structures
Project: Polynomial Project
Test: Multiple Choice and Free Response
Description of Programming Assignments








Hello World, Formatting Output: Students will learn how to
format their outputs using escape sequences to create tabs, returns
and other special characters. They will also learn the difference
between + with Strings, and + as an arithmetic operator.
Amy’s Garden Emporium: Students will learn how to create a
simple algorithm, to manage a shipment of flower pots. Based on
the number of pots, student will need to utilize modulus to
determine the number and size of boxes that will be required to
ship the pots.
Grade Converter: Give a numerical grade, student will utilize if
statements to print out the corresponding letter grade.
Combination Lock: This programming will determine if the
correct combination will open the lock.
Grade Book: Students will write a program that will accept grades
until a sentinel is entered, then the program will report the students
average.
GridWorld Case Study: Students will be completing the
programming exercises found in the GridWorld Case Study.
Students will be using Object-Oriented design principles such as
Polymorphism and Inheritance, as well as control structures
through the coding of CircleBug, SpiralBug and ZBug.
DancingBug requires the use of arrays. Students will work in
groups to design the Jumper class. In ChameleonCritter students
will modify the processActors method. Students will create the
ChameleonKid class that extends ChameleonCritter. They will
create RockHound and BlusterCritter that extend Critter, and
QuickCrab and KingCrab that extend CrabCritter.
Alphabetical Name List: Students will sort an ArrayList of names
alphabetically.
2
Magic Squares: Students will write a program that will read n
values and test whether they form a magic square when arranged





as a square matrix (when put into a square, are the sum of the rows,
columns, and diagonals equal to each other).
Designing a Game Interface: Students will use inheritance and
interfaces to design a general program for managing board games
with two players. It will be flexible enough to handle games such
as tic-tac-toe, chess, or the Game of Nim.
Comic Strip: Students will design and implement the classes that
make up a comic strip. They will use pre-written classes to create
their own comic strip.
Subdividing Squares and other Polygons: Students will start with a
program that uses recursion to break a triangle into smaller
triangles, and design a similar class that will subdivide squares and
generalize to any size polygon.
Appointment Book: Students will write a program that keeps an
appointment book. Students will design and implement a class
Appointment that stores a description of the appointment, the
appointment day, the starting time, and the ending time. These
will be stored in an ArrayList. They will be using a binary search
to find where to insert new appointments into the ArrayList. The
program will check for scheduling conflicts.
Polynomial Class: Students will implement a class Polynomial
that describes a polynomial, storing it as a linked list of terms.
Methods for adding, multiplying, printing and computing the
derivative will be written.
Download