Previous Up Next

4  CS 115 Week by week

This will be revised and augmented during the semester.

About the assigned readings below: skim the readings before class, read thoroughly soon afterwords.

Thursday exams are called ’Freshman [sic] Quizzes’ and are officially scheduled here.

week of Aug 29
kick-off and basic data types (read 1.1–1.3)

No homework to submit, but of course you should read actively: read and contemplate some of the exercises, do some in detail as practice.

In lab you will install DrJava and create a directory to hold all your work in this course. It’s a good idea to create a separate sub-directory for each assignment.

week of Sept 5
loops (read 1.3)

no class Mon the 5th (labor day)

Here is a sample program that shows the required format for code you submit for grading.

week of Sept 12
arrays (read 1.4)

Here is Deck.java discussed in class.

week of Sept 19
input/output (read 1.5; also have a quick look at these style guidelines)

Here is a design for the plateau problem that we discussed in class on Friday.

week of Sept 26
case study & review; EXAM on Thurs+Fri

Here is StdInOutDemo.java for use in lab.
Here is MonteHallBoth.java we looked at in class, and LongestRun.java like you did in lab.

review slides from Wed.

Thurs Sept 29 exam in E222 from 2:00–2:50pm; Fri exam in lecture

week of Oct 3
static methods (read 2.1)

Here is Dragon.java which we might have used in lab.
Here is TabulateAveragesSample.txt for one of the homeworks.
Here are some programs discussed in class: Coupon.java, PlayThatTune.java, PlayThatTuneDeluxe.java, TransposeTune.java.
Here are some data files for playing tunes: Ascale.txt, looney.txt, elise.txt, and freebird.txt.
Here are this week’s lecture slides.

week of Oct 10
libraries and APIs (read 2.2)

no class Mon (fall recess); Mon schedule on Tues; and no class Fri (inauguration)

A solution guide for the exam was provided in class; it refers to ExamSol.java.

week of Oct 17
recursion (read 2.3–2.4)

Here is Htree.java with animation, as well as notes on the gcd trace we did in class this Mon: GCDtrace.txt.

Here are slides that animate the stack

week of Oct 24
data types (read 3.1, and take a good look at these style guidelines)

EXAM on Thurs+Fri

Thurs Oct 27 exam in E222 from 2:00–2:50pm; Fri exam in lecture

Here is the complete program Percolation.java

Here is a sample lab solution: Conway.java

week of Oct 31
creating data types (read 3.2)

Here is Potential.java with data files charges.txt and chargesFarAway.txt.

week of Nov 7
designing data types (read 3.3)

Exam2sol.java

DJIA.csv

week of Nov 14
designing data types (read 3.4)

Apropos homework, here is RandKoch_order4.jpg

week of Nov 21
inheritance & subtypes

no class Wed–Fri (Thanksgiving)

Here is UndoTurtle.java which uses this modified version of the book’s Turtle.java as well as TurtleAction.java, TurtleGoAct.java, and TurtleTurnAct.java

Here are the slides: DNinherit.pdf

Here is the nifty hand-crafted UndoTurtleUMLclassModel.pdf

week of Nov 28
event-driven programming

Here’s some code from booksite, section 3.6:

Sample programs Graffiti.java, Squares.java Paint.java, Point.java

Library classes that aren’t in StdLib: Draw.java, DrawListener.java

week of Dec 5
wrap-up and review

EXAM Thurs Dec 8 exam in E222 from 2:00–2:50pm; Fri exam in lecture

Here is the homework assignment: MandelApp.pdf

Here are MousablePicture.java, MousablePictureListener.java, which augment the Picture API to include mouse events.

Here is a program which displays the Mandelbrot set in a MousablePicture: MandelMouse3.java and MandelMouse3Listen.java. It shows how a listener can call a method of the main application. Compared with MandelMouse2 which I distributed before, the only change is to make it more clear how coordinates in the picture are transformed (by method transform()) to coordinates in the Complex plane.

Here is a color version of the image, from the booksite: Mandelbrot.java.

dec 12
Final EXAM 1-5pm in Pierce 120

I added a solution file to the directory with last Friday’s exam problem: Exam3/SpillTurtleSol.java

Review slides: review115.pdf

CS 115 Fall 2011          Revision: 1.12 , Date: 2011/12/03 18:57:20
Previous Up Next