Click here to go to the SI Home Page

 

Philhour

"The art of teaching is the art of assisting discovery." - Mark Van Doren

AP Computer Science 2007-08 / 1st Semester

Most recent update August 15, 2007 2:33 PM

Schedule

  • Friday, August 25th - Class begins
    • Policy with regards to computer use during lecture, etc. and how to begin the class (set this page, including the section anchor #CurrentWeek, as your homepage and get right to work when you come in ... I'll always have something for you to do...)
    • Introduction to the course
      • Distribute syllabi
      • Demonstrate use of:
        • teacher's website
        • course weblog (day to day info and HW assignments)
        • course curriculum site -- walk through the major units and projects; we'll be using two programming languages (Inform and Java, mostly Java) and, for Java, two IDEs: JGrasp and Greenfoot.
        • AP Central site
        • textbook (Lambert & Osborne)
        • Public folders on Outlook (i.e., how to avoid e-mailing each other)
        • Zeus shared folders - Computer Science and personal Folders
        • My Documents and synchronization
      • Mention of AP Computer Science exam in May
      • Walk through use of gradebook (sample here) and discuss grading philosophy
      • Talk about the Homework Parties and "5th hour"; solicit "5th hours" from students with handout (or by e-mail)
      • Presentation: Interactive Fiction demonstration (how to play) -- your undivided attention is required for this short presentation (n, s, e, w, up, down, ne, nw, se, sw, inventory, examing, look, take, drop, ...) / the importance of map-making and note-taking to IF
      • Programming: Inform 7 and the HelloWorld program (mention the tradition of the Hello World program)
        • Open Inform 7; start a new project, name it HelloWorld and use your real name where it asks
        • Input the following source code into the left panel underneath the title/author material:

        The Intersection is a room. "You stand at a crossroads." The sign is here. Instead of examining the sign: say "The sign smiles and shouts: Hello World!"

        • Hit Go! and play the game in the right window.
        • We modified the program in class (thanks Gabe!) and came up with the following:

        The Intersection is a room. "You stand at a crossroads." The sign is here. Instead of examining the sign: say "The sign smiles and shouts: Hello World!"

        The Long Road is west of the Intersection. "The road is long, my friend." The rabbit is here. The rabbit is edible.

    • HW
      • Install Windows Frotz on your home computer -- this is an interpreter that allows you to play games written in Inform or other text adventure languages
      • Download Curses by Graham Nelson -- this format (called "Z-Code") is readable by Frotz. If you have trouble with this installation, don't worry -- you'll also be able to play online (without save/restore functionality).
      • Play Curses (if you are having troubles with installation, let me know, but go ahead and play Curses online) Some hints for playing:
        • Perhaps the first thing you should do is type Help and hit the Enter key.
        • One of the reasons you are playing this game is because the game employs a syntax that you have to get familiar with. Many beginners with interaction fiction (IF) get frustrated because they mistakenly think computers are "advanced" enough to understand and respond intelligibly to everyday speech. You have to talk to the computer like it understands. You'll pick it up quickly.
        • This game is fun, well-written, hard, and was created by the author of the Inform 7 programming language we'll be using this week. Have fun with it, but don't take it too seriously. We'll play a bigger variety of games next week.
        • To keep the game fun & instructive, please do not consult any solution keys, source code, or anything. It's better to experience it on your own!
      • Bring the syllabus on monday with your signature and your parent/guardian's signature -- if you need a new one, print it out from my homepage

 

  • Week of Monday, August 28th - Interactive Fiction and the Inform 7 IDE
    • Day 1
      • Play: Using Frotz and the following game files or links, take a tour of some historically popular or important IF pieces (remember to make a map and take notes):
      • Brief overview of the curriculum for the class and the grading program/philosophy
      • Lecture: a tour of the SI Starting Layout in Inform
        • using the Inform 7 documentation
        • creating new rooms
        • creating new things
        • compiling and running
        • Note: right now, the easiest way for you to get your Inform program from your home computer to your school computer is to just copy the source text into an e-mail to yourself! This also serves to back-up your work.
      • HW
        • Install Inform 7 on your home computer and open a new project
        • Download the SI Starting Layout, copy the text into your Inform source code window, and give it a whirl -- you can add or remove things, as you like, but more importantly I want you to ...
        • Familiarize yourself with the Inform documentation, the examples therein, and the search bar for getting around in the documentation.
        • Play some interactive fiction
    • Day 2
      • Announcement: we will have regular Computer Science HOMEWORK PARTIES in the Beta Lab every Monday after school. So, since Monday usually ends at 6th period, you'll be able to hang around (if you like) for further tutoring.
      • Warmup: read Graham Nelson's Craft of Adventure, in particular the Bill of Player Rights
      • Lecture: writing interactive fiction and using the Inform documentation / making a Coke Machine (updated 8/29/07)

        "Coke Machine" by Byron Philhour

        The Gym Foyer is a room.

        The soda machine is an open container in the Gym Foyer. "A soda machine is against one wall." The description of the soda machine is "Standard issue soda machine: it has a slot, a button for regular Coke, a button for Diet Coke, a coin release button, and a receptacle where things come out at the bottom. [if a can is in the receptacle]A can sits in the receptacle of the machine. [otherwise]It looks like a soda costs 75 cents." The soda machine is not portable.

        A can is a kind of thing. A can of Coke is a can. A can of Diet Coke is a can.

        The button for regular Coke, the button for Diet Coke, and the coin release button are parts of the soda machine. The receptacle is a transparent open container in the Gym Foyer. The receptacle is scenery.

        A quarter is a kind of thing. The player carries 3 quarters.

        Understand "slot" as the soda machine.

        Understand "press [something]" as pushing.

        The soda machine toll is an number that varies. When play begins, change the soda machine toll to zero.

        Instead of inserting a quarter into the soda machine:
        increase the soda machine toll by one;
        continue the action.

        Instead of pushing the button for regular Coke:
        if the soda machine toll is three
        begin;
        move a can of Coke to the receptacle;
        change the soda machine toll to zero;
        say "After a nervous pause and some loud clanging, a can of regular Coke makes its way to the receptacle.";
        otherwise;
        say "Nothing happens. Have you inserted the correct change?";
        end if.

        Instead of pushing the button for Diet Coke:
        if the soda machine toll is three
        begin;
        move a can of Diet Coke to the receptacle;
        change the soda machine toll to zero;
        say "After a nervous pause and some loud clanging, a can of Diet Coke makes its way to the receptacle.";
        otherwise;
        say "Nothing happens. Have you inserted the correct change?";
        end if.

        Instead of pushing the coin release button:
        if the soda machine toll is greater than zero
        begin;
        say "Clink clink!";
        change the soda machine toll to zero;
        now all of the things in the soda machine are in the receptacle;
        try examining the receptacle.
        otherwise;
        say "Nothing obvious happens.";
        end if.

         

      • Programming: we'll begin implementing a few things within the SI Standard Layout. You'll have some time to work on these in and out of class. Begin with the minimum specifications before going on to the advanced specifications. Please work these projects on your own. You can get help, it is best to dive into the Inform documentation and figure it out for yourself.
        • a backpack
          • Minimum specifications: a player can wear the backpack, but can only wear one backpack at a time (create two to verify this). The backpack can carry up to five other objects. The backpack can be opened or closed.
          • Advanced specifications: if the player walks from one room to another, and the backpack is open, there is a random chance one of the objects in the pack will fall out
        • the faculty elevator
          • Minimum specifications: we want to simulate a basic elevator; the elevator can be at the first floor, the second floor, or the third floor; if the elevator is at your floor, unlocking the elevator door opens the elevator and allows you to enter; if the elevator is not at your floor, unlocking the elevator door "calls" the elevator but you may not enter for one or two turns (depending on how long it takes to get there); once in the elevator, there are buttons for the 1st, 2nd, or 3rd floor. Above each elevator door is a sign specifying the floor the elevator is on. The elevator door should automatically close in a natural way.
          • Advanced specifications: the elevator stops working if any fire alarm is pulled anywhere in the building; a fireman's key allows you to shut off the fire alarm or operate the elevator when the alarm is still sounding
        • bell schedule
          • Minimum specifications: a time system is implemented (see Ch 9.6 of the documentation and the material that follows) and bells sound the start and finish of class and passing periods; crowds fill the hallways during the passing periods
          • Advanced specifications: the player is only "allowed" to be in the hallways during class time if he/she possesses a hall pass; all teachers (and Brother Draper) will query the student for a hall pass or give the student detention if he doesn't have a hall pass. A wandering non-player character (Brother Draper?) randomly moves from room to room and might intercept the player.
        • a programming challenge of your own design
          • The idea here is that we will each make a contribution to the SI engine that can be shared amongst us. You have to come up with something -- perhaps a region, perhaps a machine or tool, perhaps an event or type of process ... this is something we'll discuss. We want each contribution to be unique so that the class as a whole creates a rich, vibrant simulation of the school.
      • HW
        • Play some interactive fiction (save your best map & notes to turn in next week)
        • Programming: Add a well-described classroom (with a door) to the your version of the SI Starting Layout and continue work on today's programming project
    • Day 3
      • Warmup: Skim Chapter 9 of the Inform documentation on Time
      • Programming: continue project from Day 2
      • HW
        • Play some interactive fiction (save your best map & notes to turn in next week)
        • Programming: Add clothing to the your version of the SI Starting Layout (use Example 38 from the Inform 7 documentation for inspiration) and continue work on yesterday's programming project
    • Day 4
      • Programming: continue project from Day 2

      "Elevator" by Byron Philhour

      The Elevator is a room. "The elevator smells of coffee and cigarettes. Faint flickerings from the button panel and floor indicator indicate the elevator is powered, but tenuously.[if still] The elevator is at rest.[otherwise] The elevator is in motion."

      The Foyer is a room.

      The Second Floor Hallway is a room.

      The Third Floor Hallway is a room.

      A wall and a button panel and a floor indicator are scenery in the elevator. The button panel is a transparent open container. The button panel is not openable.

      The first floor button is in the button panel. The second floor button is in the button panel. The third floor button is in the button panel. The button to open the door is in the button panel. The button to close the door is in the button panel.

      The elevator door is a door. The elevator door is outside of the Elevator. The elevator door is scenery.

      Instead of opening the elevator door: if the Elevator is moving, say "As a safety feature, the elevator door will not open when the elevator is in motion."; if the Elevator is still, continue the action.

      The floor level is a number that varies. [* When play begins, change the floor level to a random number from 1 to 3. *] The floor level is 2. The destination floor is a number that varies.

      Instead of examining the floor indicator, say "The number [floor level] is lit."

      An Elevator is either moving or still.

      Instead of pushing the first floor button:
      now the destination floor is 1;
      if the floor level is 1 and the Elevator is still and the elevator door is closed, try opening the elevator door;
      if the floor level is 2 and the Elevator is still begin;
      now the Elevator is moving;
      say "With a jerk the elevator begins moving.";
      the Elevator arrives in two turns from now;
      end if.

      At the time when the Elevator arrives:
      say "The elevator stops moving.";
      now the floor level is 1;
      now the Elevator is still.

      The printed name of the first floor button is "[if lit]first floor button (lit)[otherwise]first floor button". The description of the first floor button is "[if lit]The first floor button is lit.[otherwise]The first floor button is unlit."

      Instead of exiting when the player is in the Elevator and the elevator door is open:
      if the floor level is 1, move the player to the Foyer;
      if the floor level is 2, move the player to the Second Floor Hallway;
      if the floor level is 3, move the player to the Third Floor Hallway.

      [* Backpack *]

      A backpack is in the Elevator. "A backpack lies here." The backpack is a container and wearable. The backpack has carrying capacity 10. The backpack is openable. Inside the backpack is a Calculus book, a pencil, an eraser, and a calculator.

      Every turn when player is wearing the backpack and the backpack is open and the backpack contains something and a random chance of 1 in 3 succeeds: move a random thing in the backpack to the location.

      • HW
        • Play some interactive fiction (save your best map & notes to turn in next week)
        • Programming: Flesh out the behavior of the people in your version of the SI Starting Layout (use Ch 12 from the Inform 7 documentation for inspiration) and continue work on the programming project
        • Coming up: I cancelled the quiz for next week but have uploaded a practice quiz
        • Reading: if you can find the time, it might be worth doing as much reading of the Inform documentation as you can. The more you understand from our in-class and online work, the more you'll understand the documentation.

 

  • Week of Tuesday, September 4 -- Inform 7 Programming Continued
    • Monday: Labor Day
    • Day 1 (Activity Schedule Tuesday)
      • BJP is on campus but out of class during 6th period today -- Mr. Gamble will be presiding
      • Check out the SI Computer Science YouTube group! Feel free to add relevant videos to this group.
      • Programming: continue working on your Backpack, your Elevator, your Bell Schedule and your Own Project; all four of these should be implemented WITHIN your "SI Starting Layout" mod, and the entire project folder should be copied to your personal folder on Zeus by DAY 1 of NEXT WEEK. In answer to some student questions: yes you may use code or code snippets that I put on this website or on the Public Folder at no penalty.
      • HW
        • Begin working this practice quiz for our quiz on Day 1 of next week. The practice quiz is due Day 3
        • Prepare your best notes & map (these can be hand-written) from a work of IF (like Curses) to turn in on Day 2
        • email me your choice for your Own Project -- I will be accepting these on Day 1 of Next Week -- I will use your e-mails to sort out conflicts (say, if two people both wanted to implement the exact same thing) so be sure to get it to me tonight!
        • Continue reading the Inform documentation
    • Day 2 (Activity Schedule Wednesday)
      • Q&A in regards to the practice quiz?
      • Turn in notes & map from the work of IF you've been playing.
      • Programming: continue working on your programming project due Day 1 of next week
      • HW
        • Continue working the practice quiz for our quiz on Day 1 of next week. The practice quiz is due Day 3
        • Continue working on your programming project due Day 1 of next week
        • Continue reading the Inform documentation
    • Day 3 (Activity Schedule Thursday)
      • Turn in practice quiz
      • If you'd like, play my SI Starting Layout V2 (available on Zeus in Computer Science, also on the Public Folder), which includes a bare but functional elevator, a bell schedule (for the first two periods -- enough to prove the point), a crowd, and a leaky backpack =)
      • Programming: continue working on your programming project due Day 1 of next week
      • HW
        • Continue working on your programming project due by the end of Day 1 of next week
        • Continue reading the Inform documentation
    • Friday: Mass of the Holy Spirit
      • Programming projects:
        • Rey: Microwave and frozen food
        • Tan: control box/panel for A/V system in classrooms
        • Providenza: fourth floor
        • Lee: weight room
        • Sarmiento: writing system / paper
        • Ng: three-digit lock and locker
        • Angelopolous: food line in commons / register
        • Greenberg: a "best friend"
        • Chan and Ryan: blackboard & eraser
        • Arabian: student center & yearbook office
        • Duhn: pool
        • Kwiat: bathroom
        • Bailey: back of student center
        • Tsui: Block Club meeting
        • Christian: Prep Shop
        • Neville: Draper
        • Kieser: Castro & riddles
        • Leonard: Ahlbach's classroom & candle
        • Kodros: Band Room
        • Protasio: Chemistry room
        • McCarty: telescope on roof
        • Jeung: theaters
        • Cashman: batting cages
        • Jose: ATM machine
        • Abinante: library and book checkout
        • Carberry: new building
        • ... am I forgetting anyone?

 

  • Week of Monday, September 10 --Major Programming Project & introduction to Computer Science & Java
    • Day 1 - Monday
      • BJP will be out today in class and after school due to jury service
      • Your programming project (elevator, bell schedule, backpack, and your special project) is due to your folder in the AP Computer Science folder on Zeus by the end of the school day. Copy the entire folder over so I can just run the program from there and watch it work. Make sure it compiles!
      • Announce 1st quarter major programming project: a first chapter in your work of IF
      • Note that the HW tonight requires your textbook! We will begin Java programming now
      • HW
        • Read Ch1.1 through Ch 1.5 in the course textbook
        • Work Exercise 1.4 (p.20) #s 1 & 4 and Exercise 1.5 # 4 and save your responses in a Word document with the following filename: HW_Ch1_yourSIemailname.doc ... in my case, for instance, the filename would be HW_Ch1_bphilhour.doc . You do not need to e-mail this to me -- e-mail it to yourself and save a copy in your folder on Zeus.
    • Day 2 - Wednesday
      • Brief discussion of policy on sharing code (basically, it's alright to do so for minor projects like we've done so far. For major projects, each student will have a different task so that solves that; exams will be pencil and paper to encourage everyone to get the concepts down in advance).
      • Begin discussion of power & broad flexibility of Java (using Inform as a reference) / usefulness of learning Java
      • Installing JGrasp, the Java JDK, etc.
      • Setting up JGrasp with proper PATH and CLASSPATH settings
      • Compiling and executing a simple Hello World! Java program:

            import javax.swing.*;

            class HelloWorld {

            public static void main(String[] args) {

            JFrame window;
            window = new JFrame();
            window.setTitle("Hello World! ");
            window.setSize(150, 100);
            window.setVisible(true);

            }

            }

      • HW
        • Read Ch 1.6 and the end-of-chapter material, particularly the Summary on p.28
        • Work Exercise 1.6 (p.26) #s 4 & 5 and include your responses in the word document described in last night's homework. Again, you do not need to e-mail this to me -- e-mail it to yourself and save a copy in your folder on Zeus.
        • Begin to attempt to install everything we need on your home computer. It can be difficult for students getting Java to compile in the JGrasp IDE for the first time. Here are the steps you have to take:
          • Make sure you have downloaded and installed both the Java Developers Kit and JGrasp from my Downloads Page
          • Write a very simple HelloWorld.java program using JGrasp (scroll up for an example); save the program in a directory of your choice (perhaps create a Java directory in My Documents?)
          • You may want to use Settings -> Look & Feel to change the JGrasp to a Windows look and feel -- it is more natural if you are used to Windows
          • Go to Settings -> PATH/CLASSPATH -> Workspace and click
          • You will create TWO new paths in the PATH tab. Use the Browse tool to navigate to the directory where your Java Developers Kit was installed -- it should look something like C:\Program Files \Java\jdk1.6.0_02. Click on the \lib directory and create the path. Do the same thing for the \bin directory. We need paths to both so JGrasp knows where to find Java!
          • You will create a CLASSPATH in the appropriate tab. Use the Browse tool and navigate to the directory where you have saved your hellowworld.java program in the first step. We need this classpath so JGrasp knows where to find your program and any of your personal program libraries.
          • Press the green "+" to compile and then press the running man to run. If it doesn't work, don't give up hope.
    • Day 3 - Thursday
      • Basic ideas in Java -- how main() is used, what the brackets {} and semicolons ; are for // what you need to know now and what we'll bloop over until later when we can better understand it
      • Using System.out.println
      • Difference between run-time and compile-time errors
      • Practice with loops -- play around with the following and change it up to see how loops work:
      • class LoopTest {

        public static void main (String [] args) {

        for (int x = 0; x < 10; x = x + 1) {

        System.out.println("x is now " + x);

        }

        }

        }

      • Here's a nested loop:

        class LoopTest2 {

        public static void main (String [] args) {

        for (int x = 0; x < 10; x = x + 1) {

        for (int y = 0; y < 5; y = y + 1) {

        System.out.println("x is now " + x);

        System.out.println("y is now " + y);

        }

        }

        }

        }

       

      • HW
        • Prepare for quiz on Inform on Day 4
        • Continue installation from last night's homework if you haven't got it by now. We're shooting to have everyone up and running so they can do homework over the weekend in Java.
        • Read Ch 2.1 through 2.5 in the course textbook
        • Work Exercise 2.5 #3 and put in a Ch 2 Homework .doc file as explained in the homework for Day 1
        • Continue playing and enjoying works of IF; keep good notes and maps; here are some examples:
    • Day 4 - Friday
      • Short Quiz on the Inform IDE, programming, and Interactive Fiction (this will be similar in format to last week's practice exam)
      • It's OK if you don't understand everything we're doing as we start Java. Look to the book, reading, and in-book HW assignments to see what you're "supposed" to know at this or any point.
      • Temperature Conversion Program

        import java.util.Scanner;

        public class Convert {

        public static void main(String [] args) {

        Scanner reader = new Scanner(System.in);
        double fahrenheit;
        double celsius; // note the two slashes here mean comment!

        System.out.print("Enter degrees Fahrenheit: ");
        fahrenheit = reader.nextDouble();

        celsius = (fahrenheit - 32.0) * 5.0 / 9.0;
        System.out.print("The equivalent in Celsius is ");
        System.out.println(celsius);


        }


        }

      • Layout managers and GUIs

      import javax.swing.*;
      import java.awt.*;

      public class GUIWindow4 {

      public static void main(String [] args) {

      JFrame theGUI = new JFrame();
      theGUI.setTitle("Fourth GUI Program");
      theGUI.setSize(300,200);
      theGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      JPanel panel1 = new JPanel();
      panel1.setBackground(Color.white);
      JPanel panel2 = new JPanel();
      panel2.setBackground(Color.black);
      JPanel panel3 = new JPanel();
      panel3.setBackground(Color.gray);
      JPanel panel4 = new JPanel();
      panel4.setBackground(Color.white);

      Container pane = theGUI.getContentPane();
      pane.setLayout(new GridLayout(2, 2));
      pane.add(panel1);
      pane.add(panel2);
      pane.add(panel3);
      pane.add(panel4);
      theGUI.setVisible(true);


      }


      }

      • HW
        • Read Ch 2.6 and 2.7 in the course textbook
        • Continue work on your 1st quarter programming project
        • Work Projects 2-4 and 2-6 (p. 55 of your textbook) -- include the source code you write in your Ch 2 HW .doc file.
        • Continue playing and enjoying works of IF; keep good notes and maps -- the reason I have you doing this is that, if you're going to WRITE good IF, you'll need to PLAY/READ good IF. I am trying my best to let you choose which work of IF suits you, so please explore and find something you enjoy!

 

  • Week of Monday, September 17 -- Introduction to the Java Language (Spirit Week)
    • Day 1 - Monday
      • Here's a copy of last Friday's quiz and the key for it: [.doc, .pdf, key in .doc, key in .pdf]
      • Check out the internet newsgroup rec.arts.int-fiction
      • Some thoughts after looking through the Inform projects:
        • I saw a lot of creativity and hard work in this project. I am looking forward to seeing what comes of our works of interactive fiction this year.
        • Very few students spent significant time debugging/testing their projects. I consider this first unit on Inform a 'getting to know you' unit, so that's Ok, but in the future you'll want to thoroughly test your project. A huge number of elevators, for instance, had bugs that would be easily noticed and solved if properly tested.
        • Now is the time to really get into the Inform documentation. As we learn Java, you'll begin to see that certain ideas (like class hierarchies) make a lot of sense in Inform and make life much easier in programming. The idea of 'keeping things general' rather than specific, is HUGE.
        • It will take me some time but I plan to update the SI Starting Layout so that includes a lot of the best ideas from the projects turned in.
      • ExperimentWithTypes.java
      • GUIWindow3.java
      • HW
        • Begin reading Ch 3 (3.1 to 3.2) ; finish entire chapter by Day 1 of next week
        • Work Exercise 3.1 (p. 59) #s 1, 2 & 4 and Exercise 3.2 (pp. 60) # 1 and put these in a HW3 file just as we've done with previous HW chapters.
        • Continue playing and enjoying works of IF; keep good notes and maps
    • Day 2 - Wednesday
      • Read about George Boole
      • Doing math in Java (don't worry, you'll make it through!)
        • Order of operations (precedence)
          • (), cast (double) or (int), *, /, %, +, -, =
          • Example: (5.0 + 3.0)/5.0 + 3.0 * 14.0 - 2.0 = 41.6
        • Casting
          • i = (int) 3.14 // this will do the same thing as i = 3
          • d = (double) 5 / 4 // this will do the same thing as d = 5.0 / 4.0
          • d = (double) (5 / 4) // this will produce 1.0! Parenthesis have higher precedence than cast
          • You can use the (int) casting technique to round decimal numbers to the nearest integer
        • The modulus % operator (also knows as the remainder operator)
        • The Boolean type
          • Booleans evaluate to true or false only (like a "bit")
          • The equals operature has to be different from the set operator, so equals is ==
          • boolean b = (5 == 3) would evaluate false
          • boolean b = (5 > 3) would evaluate true
          • Others include >=, <=, !=, ...
          • Use of Boolean in if statements
          • BooleanIfTester.java
        • The Math package (from the Java API)
      • Hand out Unit 1 Worksheet and begin work on it
      • HW
        • Continue playing and enjoying works of IF; keep good notes and maps
        • Continue reading Ch 3 (3.3 to 3.5) ; finish entire chapter by Day 1 of next week
        • Work Exercise 3.2 #14 (pp. 67), # 16 (p.68), #18 (p. 70), #24 (p. 74)
    • Day 3 - Thursday
      • Strings and Things
      • Terminal I/O for Strings using Scanner (basically, using nextLine() instead of nextInt() or nextDouble())
      • Escape sequences and Strings
        • To make a double quote within a string, use \"

        System.out.println("When he came up to me he said \"Hello\" quite abruptly.");

        • To make a newline within a string, use \n

        System.out.println("Twinkle twinkly little star\nHow I wonder what you are.");

        • To make a slash within a string, use \\
      • System.out.println("Store the file in the c:\\Program Files\\Howdy directory!");

      • The Java API!!!!
        • Go to java.util, then to Scanner and check it out -- most of it should be hard to understand, but that'll change with time
        • Go to java.swing, then to JPanel (ditto note above)
      • Continue work on the Unit 1 Worksheet (due Day 1 of next week)
      • HW
        • Continue playing and enjoying works of IF; keep good notes and maps; I'll collect your latest version on Day 1 of next week.
        • Remember that I need the genre/theme for your game tomorrow. The more detail the better -- you could even write a paragraph describing what's going to happen.
        • Continue reading Ch 3 (3.6); finish entire chapter by Day 1 of next week
        • Work Exercise 3.3 # 1 (p. 76); Exercise 3.4 #1 (p. 78); Exercise 3.5 #1 (p. 86)
    • Day 4 - Friday
      • Check out my Inform 7 cheat sheet (a work in progress -- and again, this is NOT MY ORIGINAL WORK, it consists of material from the Inform documentation)
      • E-mail me (or post to the Public Folder) a genre and/or theme for your game (examples include mystery, science fiction, horror, romance, etc., or a mix of these)
      • Using the graphics context g (note that right now you're not supposed to be understanding everything -- much of what you should be doing is making small modifications to an existing template, much of which should be opaque to you. With time, we'll understand the logic behind every single command ... but it will take time.)
      • A more complicated GUI
        • GUIWindow.java (you'll need this file for all the end-of-Chapter-3 graphics demonstrations)
        • ColorPanel.java (this is the basic, empty ColorPanel which we'll modify for the end-of-Chapter-three demos)
        • It is really important to realize that BOTH of the files above must be compiled and run from the same directory. GUIWindow needs a class called ColorPanel, and that class is only implemented in the ColorPanel.java file. Likewise, the ColorPanel.java file has no main() method! This means it simply cannot be run on its own. As things get more complicated, we'll find that each class has to have its own file. Eventually your programs will grow to a large number of related files. This is good because it keeps any individual piece of work fairly small and easy to digest.
      • HW
        • Continue work on your 1st quarter programming project
        • Continue playing and enjoying works of IF; keep good notes and maps; I'll collect your latest version on Day 1 of next week.
        • Continue reading Ch 3 (3.7); finish entire chapter by Day 1 of next week
        • Work Projects 3-6 and 3-7; include your source code in the HW3 document. Note that I will download and grade HW3 after school on Monday.
        • Continue work on the Unit 1 Worksheet (due Day 1 of next week)
        • Note that we'll have a quiz on Day 1 of next covering the material of the Worksheet and of the exercises in the book so far. See below for details.

 

  • Week of Monday, September 24 -- Introduction to the Java Language continued...
    • Day 1 - Monday
      • Be sure your HW3 document is in order: I will grade them after school today
      • Unit 1 Worksheet due, as are your latest IF notes & map
      • Quiz based on material covered in the Worksheet and the material in the exercises and projects in the book that we've done so far.
      • Introduce short-term programming project in Java (due Day 4)
        • I want you to write a kind of spirograph program
        • Essentially what this means is I want you to use for loops within the paintComponent(g)method of an extended JPanel to repeatedly draw similar figures, but with slight changes each time so that an overlap/spiral effect occurs -- how this occurs is up to you
        • I want you to include some user control in the sense that you can query the user (just using Scanner.nextInt() to choose from a printed menu) and allow the user to modify parameters at the start of the program execution. For instance, the user could tell you the number of loops in the for loop, or change the color, or something along these lines. Give the user enough choices that they can make really different looking spirographs. Note that if you include the Scanner material within your ColorPanel's paintComponent method, it will be called EVERY time you resize or otherwise repaint the component. This is fine (for now) since I haven't taught you how to pass this information from main(). (Though I'd be happy to teach you on the public folder if you asked...)
        • I am intentionally leaving the parameters of the project vague enough that each student should produce an original work.
        • Your work on the project will be excellent preparation for the Exam on Day 4. In fact, let me tell you: part of the exam on Day 4 will include a few partially or wholly written "spirograph" programs that you'll need to analyze the behavior of (as well as debug)
      • HW
    • Day 2 - Wednesday
      • Pass out grade sheets; brief reminder about the philosophy behind the gradesheet and how I expect the gradesheet to benefit you.
      • Solo programming (short-term Spirograph project and/or interactive fiction)
      • HW
    • Day 3 - Thursday
      • Solo programming (short-term Spirograph project and/or interactive fiction)
      • HW
        • Continue work on your 1st quarter programming project
        • Continue work on your short-term programming project in Java (see details above) due tomorrow (I will look at them during class)
        • Prepare for Exam on Day 4 (see below for details)
    • Day 4 - Friday
      • EXAM
        • Pencil-and-paper exam (no computers)
        • Based on all Java material so far, including the short-term programming project, the book exercises, the worksheet, my lectures, and the reading. (phew!)
        • Curricular items covered include 2e, 3b, 3c, 3d, 3e, 3h, [4a], 6d, and 6h
        • Be familiar with:
          • nothing from Ch 1 (for now!)
          • the difference between terminal I/O and a GUI (Section 2.3)
          • the use of System.out.println() and System.out.print() (Section 2.4)
          • the "basic framework" of a program (Section 2.4)
          • The Edit/Compile/Execute framework (Section 2.5)
          • the meaning behind Figure 2-11
          • the importance of PATH/CLASSPATH settings (from class)
          • the use of the java.util.Scanner class to input data (Section 2.6)
          • the creation of a simple GUI window (Section 2.7)
          • the use of Layout managers (BorderLayout and GridLayout) (Section 2.7)
          • be comfortable doing any of the Ch 2 Projects if asked
          • the java vocabulary in Table 3-1
          • the difference between int and double types (Tables 3-2 and 3-3)
          • declarations (p.62)
          • precedence (Table 3-5 & 3-6)
          • modulus operators (p. 64)
          • mixed-mode arithmetic and casting (Section 3-2)
          • String expressions and escape sequences (p. 68 & 69)
          • Creating a specialized Panel class (Section 3-7) and modifying paintComponent
          • using Graphics class elements like drawLine()
          • writing a Spirograph program
          • be comfortable doing any of the Ch 3 Projects if asked
      • HW
        • Continue work on your 1st quarter programming project (you're going to provide a release version to me at the start of class on Day 1 of next week! Other students will be playing this!)
        • Read Chapter 4 "Introduction to Control Statements" sections 4.1, 4.2, 4.3, and 4.4
        • Work Exercise 4.2 #s 1 & 2 and Exercise 4.4 #6 (a and b); save as usual into a HW_Ch4_bphilhour.doc

 

  • Week of Monday, October 1st -- practice, practice, practice!
    • Day 1
      • Release a version of your Ch 1 IF project (.zblorb format) and put it in your folder at the start of class!
      • We're going to be playing each other's IF (drafts) today. You'll need to generate transcripts (see below).
      • Transcript generation:
        • Ask four other students to test-run your game in class. They should run the .zblorb, NOT the original source code.
        • In order to test-run four games and get everything together, they'll need to play the game for only 5 to 10 (max) minutes. That's fine.
        • The FIRST thing they should type is TRANSCRIPT -- this will prompt them to save a file (to their desktop, say) which will record the transcript of their play.
        • After they've played the game to completion and have quit, ask them to e-mail the transcript file to you.
        • The transcript file is plain-text, meaning it can be opened by Notebook.
        • Put all of the transcript files in your Zeus folder so I can see them.
        • Use the transcript to guide your work on the project this week. If the player did something reasonable, but the game didn't respond correctly, fix it!
      • A note regarding submission of programs to your Zeus / Computer Science folder:
        • I learned this time what I need =) this'll making grading go much more quickly for me:
        • Please put each project in its own folder.
        • For Java:
          • In that folder should be all the .java files for all the classes in your project
          • ALSO in that folder should be all the compiled .class files for all the classes in your project
          • Put a Notebook file (.txt) in the same directory with any special instructions for me. IN THIS FILE please put the name of the class that has the main() method in it
          • That way, I can just navigate into the directory, click on the file that should contain main() ... if it doesn't, I'll check your Notebook file.
        • For Inform:
          • In that folder should be the latest working, compiled .zblorb (or equivalent) file
          • Also in that folder should be the Inform folder. That is, when I navigate in to the project folder, I should see just another folder (the Inform folder) and the .zblorb file. That way it's easy to see.
      • HW
    • Day 2
      • Check out the digibarn.com
      • Work Projects 4-1 and 4-2 today in class. Finish as homework. You'll put the source code in your Zeus folder.
        • Project 4-1: When you first learned to divide, you expressed answers using a quotient and a remainder rather than a fraction or decimal quotient. For example, if you divided 9 by 2, you gave the answer as 4r.1. Write a program that takes two integers as inputs and displays their quotient and remainder as outputs. Do not assume that the integers are entered in any order, but be sure to divide the larger integer by the smaller integer.
        • Project 4-2: Write a program that takes the lengths of three sides of a triangle as inputs. The program should display whether or not the triangle is a right triangle.
      • HW
        • Read Chapter 4 "Introduction to Control Statements" section 4.6 on the for statement
        • Finish the two projects from today if you didn't do so in class.
        • Continue work on your 1st quarter programming project
    • Day 3
      • Mr. Gamble presiding // try to convince him to teach us HTML later in the year
      • Work Projects 4-5, 4-7, and 4-8 today in class. Finish as homework. You'll put the source code in your Zeus folder.
        • Project 4-5: The German mathematician Gottfried Liebniz developed the following method to approximate the value of PI: PI/4 = 1 - 1/3 + 1/5 - 1/7 + ... Write a program that allows the user to specify the number of iterations used in this approximation and displays the resulting value.
        • Project 4-7: Computers use the binary system, which is based on powers of 2. Write a program that displays the positive powers of 2. When the user enters the exponent at a prompt, the program displays 2 to that power and prompts the user again. The program halts when the user enters -1.
        • Project 4-8: Modify the program of Project 4-7 so that the user can specify the base (2 or higher) as well. The first line of the output should display which base was entered.
      • HW
        • Read Chapter 4 "Introduction to Control Statements" section 4.7
        • Finish the three projects from today if you didn't do so in class.
        • Continue work on your 1st quarter programming project
    • Day 4
      • Lecture: I/O dialog boxes
      • Work Project 4-11 today in class. Finish as homework. You'll put the source code in your Zeus folder.
        • Project 4-11: A checkerboard consists of an 8-by-8 grid of black and red squares in which no two squares of the same color are adjacent. Write a graphics program that displays a checkerboard.
      • HW
        • Finish Chapter 4 and the project from today in class (if needed)
        • Work Project 4-12 in your textbook (making use of section 4.10 on I/O Dialog Boxes and the work from class today)
        • Continue work on your 1st quarter programming project (you're going to provide a release version to me on Day 1 of next week!)

 

  • Week of Monday, October 8th -- practice, practice, practice!
    • Day 1
      • Release a version of your Ch 1 IF project (.zblorb format) and put it in your folder and the Zeus -> Computer Science -> Interactive Fiction -> Draft IF folder at the start of the period
      • Turn in Ch 4 Projects from last week by end of day today for grading
      • Transcript: Ask four students DIFFERENT FROM the ones you asked last week to test your game and produce a transcript. Again, put the transcript in your Zeus directory and use it to guide your final draft (due Day 4!)
      • Solo programming
        • Yahtzee project: you will write a "Yahtzee" program that works as follows: when the program is executed, five "dice" are rolled (import the java.util.Random class, use Random generator = new Random() to instantiate an object of the Random type called generator, then call generator.nextInt(N) to generate a number from 0 to N.) Display the results using System.out. (not a GUI -- we can always implement that later). Then use the Yahtzee rules to give a score to the player. After each turn, prompt the user if they'd like to roll again or quit (implement a while loop and use Scanner to read in a response). You can keep adding up the score over many turns. Mastery challenge 1 (optional): if you'd like to go the extra distance, allow the player to roll twice in each turn, "keeping" whichever dice he or she wants. Then we're talking REAL Yahtzee. =) Mastery challenge 2 (optional): use ColorPanel and a GUI to display the dice!
        • BEGIN BY USING PENCIL AND PAPER TO SKETCH OUT THE "PSEUDO-CODE" FOR THE PROJECT / I will want to look at your pseudo-code before answering any questions regarding syntax, etc.
        • Note: there is a thing in Yahtzee where the player gets to choose where in his or her scoresheet he places the points -- you don't have to worry about that, just compute the largest score from any dice roll.
        • (You might want to check out the Lucky Sevens project on and about page 132 in the textbook)
        • Project is due Day 4
      • HW
        • Remember the HW party is in the Beta Lab after school every Monday!
        • Continue work on your 1st quarter programming project and the Yahtzee project both due Day 4
    • Day 2
    • Day 3
      • Visit from Mr. Dullea on Thursday the 11th
      • Lecture: using File I/O with Scanner and the File class / thrown exceptions / using while loops
        • ComputeAverage.java (remember when you save this you might need to change the file name to get rid of trailing _000 type things added when I upload to the site)
        • numbers.txt (same thing -- make sure the filename matches what is in the .java file ... you can add or remove any numbers you want from this!)
      • Solo programming (on Yahtzee or Inform projects)
      • HW
    • Day 4
      • Solo programming (on Yahtzee or Inform projects)
      • Chapter 1 of your Interactive Fiction project is due to your Zeus folder due by the end of the school day today
      • Your Yahtzee project is due to your Zeus folder by the end of the school day today
      • A note regarding submission of programs to your Zeus / Computer Science folder:
        • I learned this time what I need =) this'll making grading go much more quickly for me:
        • Please put each project in its own folder.
        • For Java:
          • In that folder should be all the .java files for all the classes in your project
          • ALSO in that folder should be all the compiled .class files for all the classes in your project
          • Put a Notebook file (.txt) in the same directory with any special instructions for me. IN THIS FILE please put the name of the class that has the main() method in it
          • That way, I can just navigate into the directory, click on the file that should contain main() ... if it doesn't, I'll check your Notebook file.
        • For Inform:
          • In that folder should be the latest working, compiled .zblorb (or equivalent) file
          • Also in that folder should be the Inform folder. That is, when I navigate in to the project folder, I should see just another folder (the Inform folder) and the .zblorb file. That way it's easy to see!
          • ALSO: please include a 'model transcript' ... that is -- play the game yourself, record a transcript, and put the transcript in this folder. That way I can see how your game was "supposed" to be played.
      • HW

 

  • Week of Monday, October 15th - Midterm Exam Week
    • Tuesday Midterm Exam
    • The key for the midterm is located in my new AP Computer Science Test Prep Site which is available from my homepage =)
      • HW
        • None ... enjoy your break! If you are really struggling in the class, go ahead and review Unit 1 (Chapters 1 - 4) in the textbook -- there isn't a single thing in there that isn't important moving forward (with the exception of the Angels on the head of a Pin exercise, which seems silly to me).

 

  • Week of Monday, October 22nd - Ch 5: Introduction to Defining Classes
    • Day 1
      • Lecture: major goals for the 2nd quarter
        • gain fluency in Java - finally understand what every word in a Java program means and why it works the way it does
        • move towards an "object-oriented" perspective with regards to programming (away from a statements/methods focus)
        • work on the "Second Act" in your IF project -- I'll be expecting you to spend time each week on this but will only check in occasionally for 'fun days' where we play each others games and generate transcripts. Near the end of the quarter I'll check back in to make sure you've made substantial progress
        • using Greenfoot I'm going to ask you to implement a working, playable, two-person adaptation of an existing tabletop or card game
        • improve quiz and exam scores: I'm going to have more regular quizzes and such so you can practice
      • Lecture: Introduction to Greenfoot -- how to use it, how to modify classes, instantiate objects (including the world object), etc.
      • Programming: modifying the Wombat character to allow it to pick up all the leaves (you should look at the act() method which is called each "turn" -- if you get really stuck, check out the Wombat2 scenario!)
      • HW
        • Begin reading Ch 5; Finish by Day 1 of next week
        • Do Exercise 5.2 #s 1 - 3, and include them, as usual, in a Word file in your Zeus folder
        • Install Greenfoot on your home computer -- if you have any trouble, let me know!
    • Day 2
      • Lecture: using Greenfoot (and the Wombat scenario) as a framework for talking about classes, including the following topics:
        • variables
          • instance variables -- related to the state of an object
          • local variables -- temporary working storage (like int i in a loop)
          • parameters -- used to transmit information to a method (formal parameters vs. actual parameters)
        • constructors
          • default constructors
        • methods
          • accessor methods (public -- used to retrieve private data from within an object)
          • mutator methods (public -- used to change private data within an object)
          • helper methods (private)
        • visibility modifiers (public and private)
          • concept of scope
      • HW
        • Continue reading Ch 5; Finish by Day 1 of next week
          • Work the Student Test Scores Case Study that begins on p. 170-- that is, you should actually be typing in the Student class and the StudentApp class as you go and testing them along with your reading
        • Do Exercise 5.2 #s 7 - 9, and include them, as usual, in a Word file in your Zeus folder
    • Day 3
      • Lecture: review of material from Day 2 on classes / introduction to TurtleGraphics
      • Programming: continue programming Wombat character until you can get it to eat all the leaves on a world; also, begin making a TurtleGraphics class that will be able (when instantiated) to draw a unique simple shape of your own choice (smiley face, star, house, astronomical constellation, ...)
      • HW
        • Continue reading Ch 5; Finish by Day 1 of next week
        • Do Exercise 5.4 #s 2 - 4, and include them, as usual, in a Word file in your Zeus folder
    • Day 4
      • Quiz on material from Ch 5 (so far)
      • Solo programming: continue working with TurtleGraphics. If you finish the "smiley face" project (demonstrating proficiency), try the following programming challenge: design a turtle that can draw a fractal of your choice (to demonstrate mastery) NOTE: fractals are best created recursively, and we won't "do" recursion until we get to Chapter 12! So really I want you to mimic a fractal but only to several iterations (not many many)
      • HW
        • Continue reading Ch 5; Finish by Day 1 of the week of Nov 5
        • Do Exercise 5.5 #3 and Review Question #s 1 - 5 (p. 195), and include them, as usual, in a Word file in your Zeus folder by Monday, Nov 5
        • Continue work on your Greenfoot / TurtleGraphics project (either the smiley face or the fractal) due Day 4 of the week of November 5

 

  • Week of Monday, October 29th - Emergency Review of fundamental Java concepts
    • Day 1
      • IMPORTANT NOTICE: I have decided to bring forward motion in this class to a halt and engage in a week-long emergency review of the Java material up to this point.
        • Based on the results of last week's quiz, informal conversations with students, etc., I can't in good conscience move forward without addressing what appears to be serious weaknesses in understanding with regards to basic Java.
        • More than 50% of the class is beneath the proficiency (3.0) level right now, and that needs to be fixed if we're going to move on with any success.
        • Exemptions: eight students are exempt from HW and classwork this week on the condition that they use their mastery of the subject to teach others. These students earned an A+, A, or A- at the quarter and include Matt C., Celena C., Chris D., Jack K., Mason K., Andrew McC., Jessica P., and Ian S.
      • Begin and work emergency review worksheet in class (.docx, .pdf) - turn in at end of period
      • HW: continue review worksheet as announced in class -- turn in at start of class on Day 2
    • Day 2
      • Continue working emergency review worksheet in class - turn in at end of period
      • HW: continue review worksheet as announced in class -- turn in at start of class on Day 3
    • Day 3
      • Begin practice review exam (finish 2/3 in class, finish final third as homework)
      • Here's the KEY for the Worksheet from Days 1 and 2
      • Here are our TUTORING HOURS for AP Computer Science!
      • HW: continue practice review exam as announced in class -- then check with key, which will be posted to AP Computer Science exam review site on my website -- and turn in at start of class on Day 4
        • Optional additional basic Java reviews -- note new dates:
          • Wednesday, November 7, 7:00 pm to 9:00 pm in the Beta Lab (meet at flagpole)
          • Thursday, November 8, 3:30 pm to 5:30 pm in the Beta Lab
    • Day 4
      • MAKEUP EXAM on material presented this week (with exemptions as listed on Day 1 above)
      • HW
        • Continue reading Ch 5; Finish by Day 1
        • Do Exercise 5.5 #3 and Review Question #s 1 - 5 (p. 195), and include them, as usual, in a Word file in your Zeus folder on Day 1 of next week
        • Continue work on your Greenfoot / TurtleGraphics project (either the smiley face or the fractal) due Day 4 of next week

 

  • Week of Monday, November 5th - Ch 5: Introduction to Defining Classes
    • Day 1
      • Lecture: review material from before the "week off" -- please do not log in, but instead take hand-written notes for this portion
        • I will make, from scratch, a Student class and implement it in a tester class that has a main() method. This should serve as some review for the quiz two weeks ago. My version of the Student class will be much less in-depth than that version.
      • Programming:
        • Project 5-3: Develop a new class for representing fractions. The numerator and denominator of a fraction are integers. The constructor expects these values as parameters. Define accessor methods to obtain the numerator and the denominator. Use the rules of fraction arithmetic to define methods to add, subtract, multiply, and divide fractions. Each of these methods expects a fraction object as a parameter. This object is considered to be the right operand of the operation. The left operand is the receiver object, that is, the one containing the instance variables for the numerator and denominator. Each arithmetic method builds a new instance of the fraction class with the results of its calculation and returns it as the method's value. Finally, include a toString() method that returns a string of the form <numerator>/<denominator>. Write a tester program that exercises all of the methods.
      • HW
        • Continue working Project 5-3 from today, due Day 1 of next week
        • Continue work on your Greenfoot / TurtleGraphics project (either the smiley face or the fractal) due Day 4
    • Day 2
      • AP Computer Science is a college-level introduction to programming. It is a hard class, made harder because it is the first year offered so there is no 'institutional memory'.
        • Are you making use of the Free Tutoring program we set up?
        • Are you keeping on top of projects?
        • Are you doing all the required reading?
        • Are you asking questions on the public folder when you don't understand something from the reading?
        • Are you doing plenty of solo programming on your own computer? Are you 'playing around' with these ideas on your own time?
      • Formally announce Second Quarter Programming project
        • Note: I have decided to scale back your Inform tasks for this quarter so we can concentrate on Java -- details to come next week
        • Check out this history of programming languages graphic (thanks Doug!)
      • Lecture: some material from Ch 5.6, including Images and Mouse events
        • Loading images: GUIWindow.java and ColorPanel.java and joey.jpg
          • Remember when downloading and saving these to put them in a new folder (since you probably already have GUIWindow and ColorPanel versions in other folders). ALSO: remember to remove the trailing _000's and stuff from the file name -- the file name must be the same as the class name
        • Tracking mouse events: GUIWindow.java and ColorPanel.java
      • Programming:
        • Project 5-9: Write a program that displays an 8-by-8 grid of panels, all of which are initially colored white. When the user presses the mouse within a panel, its color should change to a randomly generated color.
        • (Note that I removed Project 5-6 on Library stuff to give you more time to work on the two projects this week.)
      • HW
        • Continue working Project 5-3 from yesterday or Project 5-9 from today, due Day 1 of next week
        • Continue work on your Greenfoot / TurtleGraphics project (either the smiley face or the fractal) due Day 4
        • Optional additional basic Java reviews -- note new dates:
          • Wednesday, November 7, 7:00 pm to 9:00 pm in the Beta Lab (meet at flagpole)
          • Thursday, November 8, 3:30 pm to 5:30 pm in the Beta Lab
    • Day 3
      • Programming: work Project 5-3, 5-9, or your Greenfoot / TurtleGraphics project, or on your Second Quarter Programming project
      • HW
        • Continue working Project 5-3 and 5-9
        • Continue work on your Greenfoot / TurtleGraphics project (either the smiley face or the fractal) due Day 4
        • Optional additional basic Java reviews -- note new dates:
          • Wednesday, November 7, 7:00 pm to 9:00 pm in the Beta Lab (meet at flagpole)
          • Thursday, November 8, 3:30 pm to 5:30 pm in the Beta Lab
    • Day 4
      • E-mail me today your choice of game to implement for the Second Quarter Programming project
      • Practice exam: Review for Exam on Day 1 of next week using this practice exam
      • Programming: work Project 5-3, 5-9, or your Greenfoot / TurtleGraphics project, or on your Second Quarter Programming project
      • TurtleGraphics project due today
      • HW
        • Continue working Projects 5-3 and 5-9 from last week, due end of Day 1
        • All of the above are due by the end of the day Monday of next week
        • Review for Exam on Day 1 of next week using this practice exam

 

  • Week of Monday, November 12th - Ch 6: Control Statements
    • Day 1
      • Exam on material of Ch 5
        • Curricular items 4a - 4f
      • Projects 5-3 and 5-9 due by end of my workday today (3:30 pm)
      • HW
        • HAVE YOU EMAILED ME YOUR CHOICE FOR A PROJECT?
        • Begin reading Ch 6 ... finish by Day 1 of next week
        • Do Exercise 6.5 #1 on paper and turn in Day 4 (with other HW from this week)
        • Continue Second Quarter Programming project
    • Day 2
      • Lecture: Arrays -- what they are, how to use them (note: this is a preview of the material in Ch 9 -- I'm giving it to you now because I think you might find it useful on your 2nd quarter programming project, and I don't think we'll be getting to Ch 9 this quarter)
      • Programming and Design: make preparations & begin working on your Greenfoot project
        • First thing to do is make a new scenario, a new world subclass, and a new actor subclass!
      • HW
        • Continue reading Ch 6 ... finish by Day 1 of next week
        • Do Exercise 6.5 #2 on paper and turn in Day 4 (with other HW from this week)
        • Continue Second Quarter Programming project
    • Day 3
    • Day 4

 

  • Week of Monday, November 19th - Programming Practice (Thanksgiving Week)
    • Day 1
    • Day 2
      • Quiz on arrays
      • Programming: Second Quarter Programming project
      • Put in your student folder one or more "screen-shots" of your work-in-progress as well as all relevant code for the game (just copy the entire scenario folder into the appropriate sub-folder in your student foldter)
      • HW
        • none -- enjoy your break!

 

  • Week of Monday, November 26th
    • Day 1
      • Brief lecture on the static keyword and class variables
      • Handout: one-sheet on classes
      • Announcement regarding Inform: if you wish, you can write out a sample transcript for a completed game and turn it in on Monday, December 10th. This is an optional assignment. This will be used to improve your Inform grade (which may improve your semester grade). It will be graded in curricular categories 1e, 1f, 1g, and 1h (a new item which will be called "write sample transcripts for planning")
      • Programming: Second Quarter Programming project
      • HW

    Announcement: I'll be hosting another optional Computer Science review evening this Thursday, November 29th, from 7 PM to 9 PM. Meet at the Beta Lab or by the flagpole. TOPIC: GREENFOOT BASICS / HOW TO USE CLASSES AND METHODS

    • Day 2
    • Day 3
      • Brief lecture on sorting arrays and ArrayLists
        • Here's how to sort an array called x:

          import java.util.Arrays;

          Arrays.sort(x);

        • Here's how to sort an ArrayList called x:

          import java.util.Collections;

          Collections.sort(x);

        • And here's the simplest (but most time-consuming) sort algorithm, called Selection Sort -- this is like (but not exactly the same as) what the static sort() methods do in the Arrays and Collections classes above. We'll get into how to sort things FAST and SLOW next semester:

      public static void selectionSort(int [] x) {

      for (int i=0; i<x.length-1; i++) {

      for (int j=i+1; j<x.length; j++) {

      if (x[i] > x[j]) {

      int temp = x[i];

      x[i] = x[j];

      x[j] = temp;

      }

      }

      }

      }

Announcement: I'll be hosting another optional Computer Science review evening this Thursday, November 29th, from 7 PM to 9 PM. Meet at the Beta Lab or by the flagpole. TOPIC: GREENFOOT BASICS / HOW TO USE CLASSES AND METHODS

    • Day 4
      • Second Quarter Programming project: put an updated partially playable first-draft release into your student folder
      • HW
        • Prepare for full-semester Java review exam on Day 1 of next week
        • Practice exam available on my test prep site

 

  • Week of Monday, December 3rd
    • Day 1
      • Exam: full-semester review (this will give you a chance to see the material and format of the final exam)
      • Reminder regarding Inform: if you wish, you can write out a sample transcript for a completed game and turn it in on Monday, December 10th. This is an optional assignment. This will be used to improve your Inform grade (which may improve your semester grade). It will be graded in curricular categories 1e, 1f, 1g, and 1h (a new item which will be called "write sample transcripts for planning")
      • HW
    • Day 2
      • Exam results
        • 5 students of 26 earned 90% or higher on the MC portion
        • 13 students (half the class) earned 70% or higher on the MC portion
        • 13 students (the other half of the class) earned 60% or lower on the MC portion
        • The most-missed questions were #2 (10 students), #7 (14 students), #8 (13 students), #9 (16 students), #11 (14 students), #16 (14 students) and #18 (11 students)
        • About half the class is comfortable with setting up and using a class (as assessed in the free response portion).
      • My advice
        • Several students have buckled down and 'turned it around' -- there is still time to do so, but time is running out. Given the general confusion as to classes, statements, basic java language elements, etc., I would expect many more students coming for help from me or from the TAs in the coming weeks.
      • Programming: Second Quarter Programming project
      • HW
    • Day 3
    • Day 4

 

  • Week of Monday, December 10th - Final Exam Review (Final Exams week)
    • Day 1 (Activity Schedule)
      • Short (one-problem) Quiz on material from the entire semester ... in preparation for final exam
      • Peer-grading & Q&A
      • HW
    • Day 2 (Activity Schedule)
      • Short (one-problem) Quiz on material from the entire semester ... in preparation for final exam
      • Peer-grading & Q&A
    • Day 3 (Activity Schedule)
      • Short (one-problem) Quiz on material from the entire semester ... in preparation for final exam
      • Peer-grading & Q&A

      REVIEW & WORK SESSION IN BETA LAB WEDNESDAY AFTER SCHOOL

      Room.java // Hotel.java

    • Final Exam will be THURSDAY, DECEMBER 13th, covering these units:
      • Unit 2: Computer Programming
      • Unit 3: Java Programming Language
      • Unit 4: Object-oriented Programming
      • Unit 5: Algorithms and Data Structures
      • Final Exam Exemptions as of Sunday Dec 9 (more coming this week as Greenfoot projects come in)
        • McCarty (Units 2, 3 & 4)
        • Kodros (Unit 4)
        • Kwiat (Unit 2)
        • Carberry (Unit 4)
        • Sarmiento (Unit 4)
      • Conflict exams: Abinante, Carberry, Duhn, Jose, Kwiat, Protasio -- you'll take the final during the 3rd final period on the same day (Thursday) in Room 107.

Coming up next!

AP Computer Science Java Subset API




Can't find what you're looking for or
see a problem with the web site? Let us know!

© Copyright 2010, St. Ignatius College Preparatory
2001 37th Avenue, San Francisco, CA  94116 · (415) 731-7500