Courses

Computer Programming
AP Computer Programming
Conceptual Physics
Website Design II


Events

Catapult Competition
Astronomy Events


Photo Albums

Catapult Competition 2005
Catapult Competition 2004
Lunar Eclipse 27 October 2004
Swim Meet Championships Winter 03-04
Computer Monitor Refresh Rates
Physics Lab I 2003
Physics Lab II 2003


Resources

Stardate
Astronomy Picture of the Day
Heavens-Above
Intl Dark Sky Association

Contact Mr. Green

 

 

AP Computer Programming

Course Syllabus
Student Companion Website
Author's Website

Homework

Due Mon, Mar 17 four leaf clover

Programming Exercises 18.4 and 18.7

Due Thu, Mar 13

Read Karel J Robot pp. 184-189.

Read Ch. 18.1 - 18.3

Due Tue, Mar 11

Complete Programming Exercises P13.1, P13.4, and P13.6
For P13.6, plan your program out before you begin! Use polymorphism!

In class Mon, Feb 25

Optional: Lab 9

Read Ch. 11: Interfaces and Polymorphism

Due Mon, Feb 25

Design and write a simple snack bar program that simulates selling widgets (you can determine the cost). You take cash for payment and give change, but don't need to worry about counting back coins. Your snack bar should have four or more cash registers which keep track of individual sales. Your program should also keep track of total sales for the day from all cash registers (a static field should be used for this).

In addition to keeping track of sales, your snack bar should also keep track of inventory by remembering how many widgets were sold individually and in total (again, use a static field).

Your program, at a minimum, should have classes SnackBar.java, CashRegister.java, and Widgets.java.

Tuesday, Feb 19

  • Read Ch. 9

Thursday, Feb 14

  • Test: Arrays and Array Lists

Monday, Feb 11

  • p. 315 #2-6

Thursday, Feb 7

  • Answer these questions regarding arrays:
      1. Write a statement that declares an array of three integers, initialized to 1, 2, and 4.
      2. Write an expression that respresents the sum of the three elements of the above array (regardless of their current values).
    1. Mark true or false and explain:
      1. The following array has 101 elements:
      2. int x[] = new int[100];

      3. Java syntax allows programmers to use any expression of the int data type as an array subscript.
      4. The program, when running, verifies that all array subscripts fall into the valid range.
      5. Any one-dimensional array abject has a length method that returns the size of the array.
    2. Write a method that takes an array of integers and swaps the first element with the last one. Call your method swapFirstAndLast().
    3. Write a method that takes an array of chars and replaced the middle element with an asterisk ('*'). (Assume that the length of the array is an odd number.)
    4. An array of integers scores has at least two elements and its elements are arranged in ascending order (i.e. scores[i] <= scores[i+1]). Write a condition that tests whether all the elements in scores have the same values. (Hint: You do not need iterations.)
    5. p.315, Exercise P8.1 -- Here are the classes you'll need to test your code: Bank.java, BankAccount.java, BankTester.java; you only have to edit the code in Bank.java.

      -- END --

in class Fri, Feb 1

due Monday, Jan 28

due Tuesday, Jan 22

due Thursday, Jan 17

  • Ch. 6 Review Exercises, pp. 222 – 225
    #1 (a, c, e, g, i), 2, 3, 5, 6, 7, 9, 10, 13, 17

due Monday, Jan 7

  • Install the GridWorld Case Study at home. Instructions for installation should be in your binder. If you haven't installed the Java SDK, do that first. Then, install TextPad. Lastly, install the GridWorld Case Study. You must first download the GridWorld Case Study code here.
  • After installing GridWorld, complete:
    • Set 1, p. 6
    • Exercises, p. 8
    • Set 2, p. 12
    • Exercises, p. 13
    • Set 3, p. 19
    • Set 4, p. 21
    • Set 5, p. 23
    • Set 6, p. 25

In class, Friday, Dec 7

  • Turn in your homework to the librarian (or your substitute)
  • Go get your textbooks from the bookstore. Yes, they are in!
  • From the textbook, complete Problem Set 7 #2, 12. Your solutions must be recursive. (Due Tuesday, Dec 9)

due Friday, Dec 7

  • From the most recent test, remember to:
    • Give an accurate definition polymorphism as it pertains to object oriented programming.
    • Compare and contrast abstract classes and interfaces.
  • Complete any problems from the Ch. 6 Problem Set that you didn't finish for last class (for partial credit)
  • Read Chapter 7, sections 1 through 4 and expect a reading quiz.

due Wednesday, Dec 5

  • Complete Ch. 6 Problem Set #1, 2, 4, 5, 13, 26

due Monday, Dec 3

  • read Chapter 6, Sections 1 and 2

due Thursday, Nov 29

  • Read Chapter 5
  • Complete #1-4, 6-9 from the Chapter 5 Problem Set

due Monday, Nov 5

  • Read Chapter 4 of the Karel J Robot text.

due Thursday, Nov 1

  • Complete #3 from Chapter 3 Problem Set (in class)
  • Complete #5 or #6 from Chapter 3 Problem Set.

due Tuesday, Oct 30

  • Complete #1-2 from the Chapter 3 Problem Set.

due Friday, Oct 26

  • Read Chapter 3 of the Karel J Robot text.

due Monday, Oct 22

  • Read Chapter 1 and Chapter 2 of the Karel J Robot text
  • Answer all questions at the end of Chapter 1
  • Complete problems #1-6 in Chapter 2

due Thursday, Oct 18

  • *p. 187 Project 5.1 - Bonus
  • Read ch. 6 (Decisions)

due Monday, Oct 15

  • In-class: p.186-187 Programming Exercises #6, 8, 9
  • p.147 Programming Exercise 4.12 (digit extractor)

due Thursday, Oct 11

  • p.149 Project 4.1

due Tuesday, Oct 9

  • Review Exercises p. 141-3 #1, 5, 6, 7, 8, 11, 16
  • Programming Exercises p. 144-5 #3, 4

In-class Friday, Sept 28

  • Reminder: Test on Tuesday, Oct 2
  • Complete Review Exercises p. 97 #1-10, 12
  • After completing the Review Exercises (turn these in to the substitute) work on these two programming problems:
    • p. 99 Exercise P3.7
    • p. 100 Project 3.1

due Wednesday, Sept 26

  • Use your SoccerGame class and construct three games. Print the game scores (you'll have to implement accessor methods in order to get the scores from the games). The scores for each of the three games are as follows:
    • #1: 3-2, A wins
    • #2: 4-0, A wins
    • #3: 1-2, B wins