Friday, May 23, 2014

Teaching AP CompSci: LAB18 Recursion! (LAST POST THIS SCHOOL YEAR IN THIS THREAD)


Teaching AP CompSci: 
More LAB18 Recursion!

LAST POST THIS SCHOOL YEAR IN THIS THREAD:
Quarter IV Weeks 1&2: 4/14-4/25
We are done with the course now. AP review starts next week. We had a lot of FRQ based take homes through out the year, so we're going to focus on MCQs! We finished LAB18 Recursion, LAB19 Searching and Sorting and we are finishing GridWorld Part 3. Part 4 will be for homework. After AP Exam Weeks 1 and 2, we'll start Life After Computer Science 2014 (LACS2014). This school year's AP Computer Science A blog is done! Good luck on your AP Exams!

Hope you had fun learning Java with us this year. Have a great Summer, see you next year!

UPDATE: 5/23/2014
This is the last post in this thread for this year as next week is Final Review and then we have In-Class Finals. I think we had a successful year. You have all our ScreenCasts and Java Code for the whole year right here in this post! However, next year I think I'm rerecording my ScreenCasts with my current mic. The beginning of the year had poor audio. Maybe we'll record APCS Java Shorts (eve)? Have a great Summer!

Bye Bye Period 6, AP CompSci
You will be missed!
(missing Seniors from Period 1)


old LAB18

old LAB19

old GridWorld Part 3


Quarter III Weeks 7&8: 3/24-4/04
We're about finished with LAB7 about static arrays, ArrayLists, 1D and 2D arrays and the for each loop. We'll finish this up next week, the week before April Break. The week after break we'll do a short lab on Recursion. Then we have to finish GridWorld the following week. We won't have a lot of time for review since the week after is the AP Exam already!

new LAB7:


Quarter III Weeks 5&6: 3/10-3/21
We finished LAB6 about for, while and do loops. We started LAB7 about static arrays, ArrayLists, 1D and 2D arrays and the for each loop. New ScreenCasts are coming soon!

old LAB7:

Quarter III Weeks 3&4: 2/24-3/7
I'm only posting every 2 weeks lately as we've had so many Snow Days plus February Break, so we haven't been able to cover a lot of material. We did finish GridWorld Part II and we did start CH7/LAB6 Iteration!

new LAB6:

Quarter III Weeks 1&2: 2/3-2/14
OK, we finally got around to starting GridWorld! We did all the readings and questions in Parts I&II. We started the exercises at the end of Part II on p13. After February Break we'll finish these exercises and start CH7/Lab6 Iteration!

Here's a free MOOC at udacity.com based on the Computer Science textbook by Cay Horstmann from San Jose State U. My students have covered the equivalent of Lessons 1-5 (Intro, Objects, Classes, Types, Decissions) already. So, I told them to try these on their own as a review 
They could probably skip the Video Lessons and try the Problem Sets which give plenty of feedback in the case of errors. 

We did some of Lessons 8&9 (More Classes, Interfaces and Inheritance). But I told my students not to try these on their own yet as about half of these Problem Sets are based on Lessons 6&7.

I'm covering GridWorld right now, but there's nothing on GridWorld, I'm afraid!

After GridWorld we are doing the equivalent to Lessons 6&7 (Loops, Arrays). I told my students that, if they want a head start, they could watch these Video Lessons!


GridWorld Parts I&II:

Quarter II Weeks 8&9: 1/13-1/24
We finished CH5 this week about Conditional Statements, Boolean Expressions and Predicate Methods. In fact, we went a bit nuts this last couple of weeks or so on Line.java, C5X15. This project was about abstracting a line of the form y=mx+b by encapsulating m and b. The lab question wanted us to write isParallel(Line other), intersects(Line other) and equals(Line other) predicates. I went ahead and extended the Object class by overriding equals(Object other) and toString(). I even implemented the Comparable interface with the compareTo(Line other) method. So, we started talking about Inheritance and Polymorphism. The project also asked us to overload the constructors: Line(m,b), Line(m,x1,y1) and Line(x1,y1,x2,y2) with out rewriting code. We also added graphics! Next week is the last week before midterms, so the students can finish their labs and hand them in by Friday. I think we'll start GridWorld soon after midterms.

Finishing new LAB5, Line.java:

Quarter II Week 7: 1/6-1/10
We continued CH5 this week about Conditional Statements, Boolean Expressions and Predicate Methods. We even started talking about OOPs concepts such as ReUsable Code, Extending the Object Class and Implementing the Comparable Interface! YouTubes on these OOPs topics are still in the works.

Oh, apparently, this is what we do between periods before AP CompSci:

Quarter II Week 6: 12/16-12/20
We continued CH5 this week about Conditional Statements, Boolean Expressions and Predicate Methods. We also finished Number Systems and Chip Logic! I did the #HourOfCode again on Monday as an in school field trip for our Honors 9th Grade Math classes to advertise AP Computer Science. Due to budgetary constraints, we're not offering an intro CompSci course anymore. So, Honors 9th and 10th Graders won't have that option anymore. Friday was, of course, GAMEDAY!

Quarter II Weeks 4&5: 12/2-12/13
We started CH5 this week about Conditional Statements, Boolean Expressions and Predicate Methods. We also finished Number Systems and Chip Logic!

Chip Logic:


new LAB5:



Quarter II Week 3: 11/25-11/29
We finally finished CH4 this week. We have Take Home 4 due this Tuesday. We printed Lab 4. This was a short week due to Thanksgiving, so that's about it! Next week we'll start CH6+Lab5 on Conditional Statements. Of course, Wednesday was GAMEDAY!

Quarter II Week 2: 11/18-11/22
We continued CH4 this week. We went nuts with "Can you name that number?" aka Number Systems. We converted to Base 10. We converted from Base 10. We counted, added and subtracted in various bases: BIN, OCT, HEX. See ScreenCasts below!

Quarter II Week 1: 11/11-11/15
We continued CH4 this week. We also continued "Numeral of the Day!" aka "Can you name that number?" For example, 111BIN, 222TRI, 777OCT and FFFHEX=? We wrote several classes where finals were useful such as the CashRegister class which had public static final double QUARTER_VALUE=0.25 listed after the private instance fields. We also dealt with various forms of input from main: JOptionPane, Scanner and args[0]. When using JOptionPane and args[0] we had to use Double.parseDouble() or Integer.parseInt() quite a bit!

Quarter I Week 9: 11/4-11/8
We started CH4 this week about the differences between byte, short, int, long, boolean, char, float, double variables and finals. We also started "Numeral of the Day!"

Number Systems:


new LAB4:




Quarter I Week 8: 10/28-11/1
We finished Lab3 which talks about writing your own classes from scratch. Our first TakeHome Tuesday on this chapter is due next week!

Quarter I Week 7: 10/21-10/25
We continued Lab3 which talks about writing your own classes from scratch. We are doing the end of chapter exercises as labs. We do the odds together so I can model new concepts. I am rerecording the odd exercises  as ScreenCasts for YouTube. The students complete the evens as labwork in groups. New Lab1 ScreenCasts are done. New Lab2 ScreenCasts are almost done. Sorry, there's no new ScreenCasts for Lab 3 yet. I have a link to my old Lab3 ScreenCasts. See my DropBox link for all our code so far. See links below.

Quarter I Week 6: 10/14-10/18
We started Lab3 which talks about writing your own classes from scratch. We have to come up with our own Contructors, Accessors and Mutators for the first time. We also discussed Abstraction and Encapsulation! Sorry, there's no ScreenCasts for Lab 3 yet.

old LAB3:



Quarter I Week 5: 10/07-10/11
Out sick.... However, I did start using DropBox and I added some screencasts for Lab 2, see above!

Quarter I Week 4: 9/30-10/4
This week we finished Lab2 by introducing the StdDraw class from Princeton's CS101 course. Here we used Object Based Programming to draw Rectangles, Ellipses and Lines! See all the code linked below from my PasteBin account (last link). I've also been redoing my ScreenCasts in the APCS Shorts playlist on my YouTube channel (see below too)!

Quarter I Week 3: 9/23-9/27
This week we started Lab2 based on Chapter 2. In this chapter we discuss constructing objects from existing classes: Rectangle, Color, Random and String. We started talking about Constructors, Accessors and Mutators as well a Private Instance Fields. I'm reworking the ScreenCasts as short summaries after class. I have a new playlist (see below) with only HelloWorld so far.

new LAB2:



Quarter I Week 2: 9/16-9/20
We had a good week this week! We finished Lab1 based on Chapter 1 Exercises 1-8 (see Code and ScreenCasts below). We basically covered everything you ever wanted to know about main() methods and println()! We just started talking about Chapter 2 and Lab 2, Object Based Programming (using existing classes, constructors, objects, accessors) at the end of the week.

Our networking and various hardware issues are all corrected now (except the HP Color LaserJet is still down). My networking issues required setting up a static IP on the SmartBoard or Teacher PC. So, I have access to all my sites at school, finally!

address: 10.5.129.25
netmask: 255.255.0.0
broadcast: 10.5.0.254
dns: 10.1.1.19
proxy: NONE! (was 10.0.0.125)

There's a bit of lag on the LAN. So, I think I'll make Static IPs for the students too as there may be a DHCP conflict. However, the student stations are required to have the proxy.

Also, most students can access the ssh server from home. Some of us have Linux running at home which makes accessing java files the same as in class. Some students are logging in using putty from WIN but cannot use GUI applications from home (WIN graphics engine does not recognize the LIN graphics engine). Some have Mac at home and find that the MAC terminal works just like the Linux terminal at home including GUI ssh tunnels using: "ssh -Y userid@173.251.48.56"

Quarter I Week 1: 9/9-9/13
APCS had a slow start this year with a lot of networking and server issues. I think we're up to snuff now. We're in Chapter 1 of Cay Horstmann's fabulous text. All we did was write serveral versions of HelloWorld. This is a fine way to become familiar with our Linux based system. 

We talked about how to use our server from home using putty in Windows or a terminal in Mac and Linux land.

We also talked about CLI vs GUI, ASCII and Unicode, SSH vs FTP, javac vs java, etc. We also talked about the importance of comments and self-documenting code!


What's new this year is that I'm trying to stick to a CLI for coding in java all day every day! All we need is a shell or terminal to run javac, java and a text editor. This way we call login from home and do our work the same way we do in class even from a Mac terminal or by using putty in Windows!



new HelloWorld:


new LAB1:


Well, that's all folks!

No comments:

Post a Comment