Calderbank AP Comp Sci 2014-2015 Pg 1 AP Computer Science Instructor: Mr. Calderbank Email: mdcalderbank@cps.edu Webpage: lindblomeagles.org. Go to Academics, Computer Science Department, Calderbank’s AP Comp Sci Room: 100 Text: Introduction to Programming with Greenfoot , Michael Kolling Tutoring: After school Tuesdays, Wednesdays, and Thursday from 3:15 to 4:15 Course Description: This is the AP level Computer Science course using Java. We will examine object oriented programming using an interactive Greenfoot GUI as well as a more robust NetBeans environment. This class emphasizes the methods for writing programs, an in-depth study of algorithms, data structures, search and sort. This class is very much lab-based; there are structured lab components composed of at least 40 hours of class lab time. At the end of the year, you should have a clear understanding of Java and the confidence to adapt your own programs into any other language. Course Goals: There are 6 main goals for this AP Class, from CollegeBoard, in addition to the mandatory lab component: Design and implement computer-based solutions to problems A) Use and implement commonly used algorithms B) Use commonly used data structures Select appropriate algorithms and data structures to solve problems Code fluently in an object-oriented paradigm using the Java programming language Use elements of the standard Java library from the AP Java subset tested on the AP Comp. Science Exam Recognize the ethical and social implications of computer use Nuts and Bolts of the Course Since the AP test is a written test (there is no computer lab part), and you’ll be asked to write java code for the free response part, our unit exams (every 3 or 4 weeks) will be written, and there will be some written parts for projects. Most of the time, you will turn in Java projects online. The way we’re going to set this up is with a DropBox account shared with me: mcalderbank@gmail.com and you can automatically save your files and access them online or at home. This will also be the way that I give files to you. You will want a 3-ring binder for all the lab handouts. I do not have an online copy of all the lab handouts (yet). Grading: You will receive a half-credit at the end of the first semester and another half-credit at the end of the second semester. The grades for this class will be based on the following items: Assignment Weight Description Grading In-Class Labs 40% These labs come from Introduction to The in-class labs have several check+ Greenfoot as well as NetBeans initial projects I points, you get a 1 pt for every Mini-Quizzes have created. checkpoint you reach, as you show me in class you have finished. Tests 25% Ties material from labs with sample AP Grading will be based on completeness multiple choice and free response, 1 hr and conceptual understanding. Minor written tests. syntax errors will not count against you. Projects 25% These are mostly extension from in-class stuff, Submit this in the DropBox folder, and may involve some minor HW if unfinished along with all your code. It should run in class. There are also some Coding Bat in Greenfoot. Be sure to include Projects appropriate comments Final 10% Comprehensive of each Semester; this will be Same situation as an In-class Test a written test based off of AP materials. You will be given a Java Reference Guide. Grading Scale: A 100 – 90% B 89 – 80% C 79 – 70% D 69 – 60% F 59% and below Calderbank AP Comp Sci 2014-2015 Pg 2 Make – Up Work: Students are permitted to revise assessments to encourage mastery of content and/or skills. For quizzes, students will have an opportunity to make corrections to quizzes. Upon successful completion of corrections, students can retake quizzes in an effort to improve their grade. Late work: If a student was present but did not turn in an assignment on the due date, the student will lose 10% per school day. If a student has an excused absence from school, then s/he is responsible for collecting the missing work on or before the day that the student reports back to school. Otherwise, it will be considered late work. Late homework will be accepted up until one week before the end of the quarter (for a minimum grade of 50% per assignment), as long as the assignment is fully complete. Late POWs may be accepted, but no minimum grade is guaranteed. If a student needs additional support to achieve mastery on the assignment, the onus is on the student to seek out their teacher to establish a support session outside of class time. Code and Projects: 1. The most important thing for your code is that it must be readable, piece by piece. That’s not just for this class, but for anyone else that needs to use or modify your code. It is also especially important when you need to go back and make changes to your code. 2. I’ll be checking to see if your code runs, please put all your files in a DropBox Folder called, “APCompSci1415_firstname_lastname” 3. Comments are helpful! Use them when you initialize your method to explain what it can do. Each method should correspond to an English sentence. If you need more sentences, split your method into more parts. Leaving the classroom: Only if it is not disruptive to do so, and during your own classroom work time. We have a small class, so just let me know discretely. Advice: Be aware, be flexible, creative, come to class on time and have fun working on your projects. Student Java Resource Websites Resources online for Greenfoot book: http://www.greenfoot.org/book CodingBat. Great immediate feedback exercises: http://codingbat.com/java A free Java Book! http://www.bluepelicanjava.com/ The Ultimate Java Resource: http://docs.oracle.com/javase/8/docs/api/index.html Here’s the AP Central site: http://apcentral.collegeboard.com/home Calderbank AP Comp Sci 2014-2015 Pg 3 Course Outline Unit and # of Weeks Unit 0 ( 2 weeks) …in computer science, we start counting at 0. Unit 1 (4 Weeks) BeachWorld Key Topics to be Learned Labs/Assessment -Introduction to Object Oriented Programming (Inheritance, Has-a or Is-a classification, classes, subclasses) Lab: Successful completion of checkpoints in Chapter 1: Creating instance of subclasses and identifying the has-a or is-a relationship -Ethics of Programming: Where is the line between helping another student learn and helping them fail (by giving code)? -Chapter 1 of Greenfoot with World class, Actor class and subclasses Wombat and Leaf that extend Actor, also have methods inherited from Actor -Essay on honor code for coding -Basic class structure including instance variables, local variables, parameters, methods and refinement of methods, constructors, main method, return types. Lab: Successful completion of checkpoints in Chapters 2 -4 of Greenfoot. Involves student creation of code so that all subclasses of actors interact with each other -Creation of Worm, Crab, Lobster subclasses of Actor with different act(), turn(), eat() methods. Inheritance and public access of private instance. -If / else, Java.lang.Math.random(), line by line sequencing of code , typcasting -Written Test using BeachWorld structure with new Animals and a modified act() and eat()structure. -Error correction and Debugging: 1st steps. Unit 2 (4 Weeks) -For loops: For each structure, increment structure, step by step process. Array Index starts at 0! If / else statements contained within the loops, System.out.println Lab: RandomArray lab, students find min, max, indices, partial sums, Sequential and Binary Search Loops, Arrays, Search, -while loops: Avoiding infinite loops, base case necessary, call to public methods Greenfoot (Piano Lab): students use while and for loops with if statements to construct a Piano using black and white key, subclasses of actor -Sequential Search and Binary Search: How many steps do they take? Choosing the correct indices and condition for the loops. Applied to random lists of integers and arrays. Unit 3 (? Weeks) Strings and Magpie -Computer Ethics: Open source vs. closed source code. What are benefits of each philosophy? -Familiarity with AP Java Subset of String methods: length, substring, indexOf methods -Apply Magpie findKeyword method to generate more appropriate responses, and modify responses to give Chatbot a different personality (i.e. nagging parent) -Use of Arrays with Strings to get and generate response, emphasize that Arrays can hold ANY data objects, including Boolean, int, double and other constructors. Unit 4 (6 Weeks) 2D Arrays, Interfaces and Picture Lab -Nested For loops. We can have two indices crawling through the array, going forwards and backwards. Access an element, set value, get the number of rows or columns -Use of the Java Color class to define a color using Red, Green and Blue numbers. -Written Test on concepts from Labs, applying search to an array and constructing a loop Lab: Students manipulate an array of strings which contains all their actual names. Apply all the methods of array listed above, as well as finding lengths and substrings within text Magpie Lab: Students modify code to add new functionality of more responses, and changing structure of input sentences -Written Test with extensions from Lab work as well as vocabulary All concepts come from within the Picture Lab Lab: Students are able to apply the methods in ColorChooser and PictureExplorer to find indices, and change colors. Students use their Calderbank AP Comp Sci 2014-2015 Pg 4 own picture to create a new -Interfaces, specifically that a SimplePicture is an SimplePicture that they manipulate, implemented of the DigitalPicture Interface. Note that changinging colors and creating this can only have public abstract methods, no body. vertical and horizontal mirrors Important distinction for how Java handles inheritance. Implements vs. Extends for SimplePicture, Picture, Student apply concepts of mirrors DigitalPicture with a random number array to reverse the order and manipulate -With Picture Lab, use nested for loops to create vertical or each half of the array horizontal mirrors, or apply a color change filter Unit 5 (5 Weeks) Sort: Insertion and Selection Sort, ArrayList -Step by step, how insertion sort and selection sort work: Selection sort finds the minimum element in the rest of the array and puts it first; insertion sort looks to place the next element in the array in the correct spot. -Apply both sorts to various Data Objects already studied: String array of names, random integer arrays. Discussion of how many steps each algorithm takes and how much memory is used -Student examine ArrayList as -Ethics of Programming: Copyright law. What are the forms of copyright out there? If something is released for free to the public, is it copyrighted? How do you feel about your current Computer Science work? -Written Test with extensions of Picture Lab, Interfaces, and nested for loops Lab: -Students do not create the insertion or selection sort, but they are responsible for analyzing the code and showing a step by step implementation of each algorithm -Students examine how long the program takes, how many times it goes through each for loop, and whether it creates new memory space. Best case and worst case -Students see that there is a form of license where the product is licensed freely but under specific conditions, and other products are necessarily not free Unit 6 *Using the AP Professional Development Curriculum Module* (5 Weeks) Recursion -Examine cases of recursion without code, and how a process can call itself to repeat in a self-similar manner: Fractals, increasing lengths. Recursion has a bail-out, a way to deal with the base case, and a call to itself (Activity 1) -Written Test: Application of both sorts with time and different lists Lab: Students examine how fractals like Koch snowflake are created, by showing step by step how the program executes. (line by line case, with physical examples) -Use the structure of a recursive method with Russian dolls. How many inner dolls, how many wearing babushkas, red hair, etc (Activity 2) -Students modify an example of a recursive structure to create new recursive methods -Discussion of when recursion makes sense and it saves time and space. Note: It doesn’t make sense for combinations, since that take a lot of time already, but it does for examples that are naturally repeating: Like a Racquetball game (Activity 3) -Students apply Merge-sort to their list of names or a list of strings, showing how it operates line by line Unit 7 (3 Weeks) AP Exam Review and Ap Test on May 7th -MergeSort, divide and conquer strategy of using a helper and splitting up the array and merging elements. -Barrons Multiple choice problems (Inheritance, polymorphism, loops, nested loops, recursion, arrays, indices, etc) -Practice Free Response questions with guided analysis of how the responses will be scored -Create working solution for all 21 CodingBat AP-1 problems: http://codingbat.com/java/AP-1 -Written Test: Students are able to write a recursive method for an iterative math Process -Daily practice with small multiple choice quizzes and a discussion of common misconceptions Unit APCourse.length1 (4 weeks) Post AP Exam Project Calderbank AP Comp Sci 2014-2015 -Greeps! Students work in pairs to create a working Greeps GREEEEEEEEEEPS!!! game that can pass the ten level muster Courtesy of Greenfoot Interlude Project -Students program alien Greeps to collect tomatoes and bring them back to the mothership. Greeps can only see in front of them, but they can spread little paint clouds to help other Greeps see them. Pg 5