ENGR 131: Elementary Computer Programming

Fall 2007, Prof. Michael Branicky

Case Western Reserve University


General Information

Information Sheet

Lecture Hours: TR 1:15-2:30pm, Millis, Schmidt Lecture Hall

Course Instructor: Michael Branicky, mb [æt] case [daat] edu, Glennan 517B, x6430
Instructor's Office Hours: M 2-5pm

Lab Instructors [ Day Time (CRN) / Name, Email ]:
T 02:45pm-03:35pm (69424) / Eric Johnson, ehj [æt] case [daat] edu
T 04:30pm-05:20pm (17286) / David Allen, dxa59 [æt] case [daat] edu
W 09:30am-10:20am (57329) / Alex Schepelmann, axs287 [æt] case [daat] edu
W 11:30am-12:20pm (46922) / Jesse Fish, jof1 [æt] case [daat] edu
R 08:55am-09:45am (17290) / Nicholas White, nnw [æt] case [daat] edu
R 02:45pm-03:35pm (46919) / Dong (James) Tang, dxt51 [æt] case [daat] edu

Required Text
Detailed Syllabus

Mirror sites

http://dora.case.edu/msb/131-F07
http://vorlon.case.edu/~msb11/131-F07

Announcements

Lectures [and Assigned Reading]

Lab sessions: Start this week

29 AUG: Lecture #01: Course Mechanics / Intro / HTML [Liang 1.1-4]
eHandouts: Reasons #3, #47, Intro to HTML (by Savitch), Savitch's Simple HTML File, helloworld.html, Example Home Page
31 AUG: Lecture #02: Compiling/Running Programs [Liang 1.6-11]
Handout: Hello, World!
Programs to check out: HelloWorld.java, helloworld.c (C), helloworld.cc (C++), helloworld.m (Matlab), helloworld.py (Python), WelcomeInMessageDialogBox.java

Review Questions [from Liang]: 1.8, 1.11-17

Lab: LA#1; PS#0 due, PS#1 out
04 SEP: Lecture #03: Data Types and Declarations; PS#0 due [Liang 2.1-2.7.2, 2.13, 1.5]
Programs to check out: TemplateProgram.java, Average1.java, Average2.java, DeclareAndPrintDemo.java, ScannerDemo.java
Review Questions [from Liang]: 2.1-6, 2.8-10, 2.12-13
06 SEP: Lecture #04: Expressions and Operators / Math Class [Liang 2.7.3, 2.8-2.12, 2.14-2.15, 5.9, Math Class documentation]
eHandouts: Problem to Program: Wind Chill, Rolling a Die in Java
Programs to check out: Average3.java, Arithmetic1.java, Arithmetic2.java, MathDemo.java, WindChill.java
Review Questions [from Liang]: 2.14-16, 2.17, 2.19, 2.22, 2.26-29, 3.14-15


Lab: LA#2; PS#1 due, PS#2 out
11 SEP: Lecture #05: If-Else / Logical Operators [Liang 3.1-3, 3.6, 3.7]
Power-of-if Links: Stimulus-Response Agents, iRobot's Roomba, DARPA Urban Challenge
Programs to check out: WindChill2.java, IfDemo.java, IfElseDemo.java, WindChill3.java
Review Questions [from Liang]: 3.1-5, 3.10-13
13 SEP: Lecture #06: While / Assignment Operators [Liang 4.1-2, 2.7.4]
Power-of-while Links: While in Battle, While in Action
Programs to check out: NaiveRepeat.java, RepeatN.java, RollDieUntilConfirm.java, WindChillWhile.java

Lab: LA#3; PS#2 due, PS#3 out
18 SEP: Lecture #07: For Loops [Liang 4.4-6]
Power-of-for Links: For in Action, For Challenges
Programs to check out: NestedLoops.java
Review Questions [from Liang]: 4.4-5, 4.8 (convert to while only), 4.16 (lines 1-14 only), 4.17

20 SEP: Lecture #08: Nested Loops / Loop Analysis [Liang 4.7-8]
Programs to check out: NestedLoops2.java, NestedLoops3.java, DieSums.java, CountDemo.java, CountTimeDemo.java, PrimeTester.java, Grid.java
Review Questions [from Liang]: 4.18a-c, 4.19

Lab: LA#4; PS#3 due, PS#4 out
25 SEP: Lecture #09: Class Methods I [Liang 5.1-5]
Programs to check out: turtlefun.py, MethodsDemo.java
Review Questions [from Liang]: 5.1, 2, 6, 7, 9
27 SEP: Lecture #10: Class Methods II / Procedure Abstraction [Liang 5.6, 8-11]
eHandout: Procedure Abstraction
Programs to check out: TestMax.java, WhileMethods.java, ForMethods.java, Weather.java, Weather2.java, Peculiar.java
Review Questions [from Liang]: 5.10, 11, 13, 15-18

Lab: LA#5; PS#4 due, PS#5 out
02 OCT: Lecture #11: Arrays I [Liang 6.1, 6.2 (not 6.2.7), 6.3 (one one-by-one method)]
Programs to check out: MaxMinAvg.java, DiceStats.java
Review Questions [from Liang]: 6.1-9
04 OCT: Lecture #12: Arrays II [Liang 6.4-5, 6.7, 6.8.1, 6.10 (not 6.10.3), 6.11]
Programs to check out: ArraysDemo.java, Robots.java, TicTacToe.java
Review Questions [from Liang]: 6.12, 13, 17, 18, 25, 27, 28
04 OCT: Help Session, 7-8:30pm, Rockefeller 301 (TA Jesse Fish)

Lab: LA#6; PS#5 due, PS#6 out
09 OCT: Lecture #13: Files I [Liang 8.7, 8.8]
eHandout: Files, or Places to Put Your Stuff
Programs to check out:
TestFileClass2.java
ReadFileTrial.java
ReadFileTrial.java   (to run, also download MadlibDataTrial.txt)
ReadFile.java   (to run, also download MadlibData.txt)
WriteFile.java
PrimeFinder2.java
GLRatings.java   (to run, also download u.data [1.9MB])
Review Questions [from Liang]: 8.25-31
11 OCT: Lecture #14: Files II
Reading:
Stepwise Refinement / Iterated Development
Program Development Plan
Image File I/O in Java
Programs to check out: ColorFun.java
From Fall 2006: PA#7   Best of "Programming Assignment #7"
11 OCT: Help Session, 7-8:30pm, Rockefeller 301 (TA Jesse Fish)

Lab: LA#7; PS#6 due, PS#7 out (due week of 29 OCT)
15 OCT: Usual Office Hours, 2-5pm, Glennan 517B
16 OCT: Lecture #15: Cleanup / Review for Midterm Exam #1
Review Problems eHandout (print and bring to lecture)

Some extra programs to check out: SimpleIO.java, SimpleFlow.java, SimpleMethods.java

16 OCT: Review Session, 7-8:30pm, Clapp 108 (TA Jesse Fish)
17 OCT: Special Office Hours, 4-5pm, Glennan 517B
18 OCT: Lecture #16: Midterm Exam #1 (in class; covers Lectures 1-10; PS 1-5)

Lab: None this week; no PS due this week
22 OCT: FALL BREAK (No Office Hours)
23 OCT: FALL BREAK (No Class)
25 OCT: Lecture #17: Exam Recap / Strings [Liang 8.2, entire section except for intern in 8.2.2 and regionMatches on page 265]
Selected String class methods, String class documentation
Review Questions [from Liang]: 8.1, skipping (7); 8.3-6
Programs to check out: Palindromes.java

Lab: LA#8; PS#7 due, PS#8 out
30 OCT: Lecture #18: Objects and Classes I [Liang 7.1-7.4.2]
Sun's documentation: What Is an Object?, What Is a Class?
Review Questions [from Liang]: 7.1-2
Programs to check out: Circle.java, CircleTest.java, Robot.java, RoboWorld.java
01 NOV: Lecture #19: Objects and Classes II [Liang 7.3-7.4, 7.6]
Review Questions [from Liang]: 7.2, 7.10, 7.11

Lab: LA#9; PS#8 due, PS#9 out
06 NOV: Lecture #20: Objects and Classes III [Liang 7.7-12]
Review Questions [from Liang]: 7.13, 7.14, 7.15, 7.22
Programs to check out: CircleTest2.java
Case study: Liang's Problem 7.4
08 NOV: Lecture #21: Objects and Classes IV [Liang 7.13-17]
Programs to check out: Movie.java
Case study: Complex Class Problem (Solution that we developed in lecture: Complex.java)
Case study: IntegerSet Class Problem (Solution: IntegerSet.java, IntegerSetTest.java)

Lab: LA#10; PS#9 due, PS#10 out (due after Thanskgiving)
13 NOV: Lecture #22: Inheritance / Intro. to GUIs [Liang 9.1-5; 12.1-4]
Review Questions [from Liang]: 9.1,3,4; 12.3-5
Programs to check out: Parent.java, PayMovie.java, PG13Movie.java
eHandouts: GUI Components
Programs to check out: GUIComponents.java
15 NOV: Lecture #23: Cleanup / Review for Midterm Exam #2
Review Problems eHandout (print and bring to lecture)
Java Reference Sheet eHandout (print and bring to lecture)

Some extra programs to check out: ClassInstanceExample.java, GetAndSetExample.java

15 NOV: Review Session, 7-8:30pm, Rock 301 (TA Jesse Fish)

Lab: None this week; no PS due this week
20 NOV: Lecture #24: Midterm Exam #2
22 NOV: THANKSGIVING HOLIDAYS (No Class)

Lab: LA#11; PS#10 due, PS#11 out
27 NOV: Lecture #25: GUIs (1:15-2pm); Game Programming (2-2:30pm by Prof. Buchner) [Liang 12.5, 14.1-2, Table 14.1, 14.3.3, 14.4 (mouse)]
Review Questions [from Liang]: 12.7-9, 14.10
Programs to check out:
GUIComponents.java,
Addition.java,
Histogram.java, HistogramTest.java,
Liang's TestActionEvent.java,
Liang's Exercise14_4.java
29 NOV: Lecture #26: Applets [Liang 16.1-4, 7, 8]
HTML Review:
Intro to HTML (by Savitch), Savitch's Simple HTML File, helloworld.html, Example Home Page
Applets to check out:
First, see those in Useful/Fun Links section below
HelloWorldApplet.java, HelloWorldApplet.html
Loan.java, LoanApplet.java, LoanApplet.html
FinalApplet.java, FinalApplet.html
TicTacToe.java, TicTacToe.html
Ball.java, BallControl.java, BounceBallApp.java
29 NOV: Help Session, 7-8:30pm, Schmidt Lecture Hall (TA Jesse Fish)

Lab: LA#12; PS#11 due
04 DEC: Lecture #27: JavaScript and Other Languages / Recap
Prof. Branicky's Tower of Babel
Other Languages
JavaScript Examples
JavaScript BMI Calculator
JavaScript eHandout

Final Exam Information Sheet
Programs You Wrote
Movie Clips

Best of PS#7 Contest (JavaScipt version)
Chromakey Contest

FinalApplet2.java, FinalApplet2.html
06 DEC: Lecture #28: Review for Final Exam
Review Problems eHandout (print and bring to lecture)
Java Reference Sheet eHandout (print and bring to lecture)
06 DEC: Help Session, 7-8:30pm, Schmidt Lecture Hall (TA Jesse Fish)

10 DEC: Special Office Hours, 2-3pm, Glennan 517B
12 DEC: Special Office Hours, 4-6pm, Glennan 517B
13 DEC: COMPREHENSIVE FINAL EXAM (4:00-7:00PM)

Code Repository

Problem Sets

Problem Set #0 (due by start of lecture 09/04)   FAQ

How To Submit Problem Sets
Olin 703 Access Survey [closed]

Problem Set #1 (due by start of lecture 09/11)   FAQ   Survey   Solutions
Problem Set #2 (due by start of lecture 09/18)   FAQ   Survey   Solutions
Problem Set #3 (due by start of lecture 09/25)   FAQ   Survey   Solutions
Problem Set #4 (due by start of lecture 10/02)   FAQ   Survey   Solutions
Problem Set #5 (due by start of lecture 10/09)   FAQ   Survey   Solutions
Problem Set #6 (due by start of lecture 10/16)   FAQ   Survey   Solutions
Problem Set #7 (due by start of lecture 10/30)   FAQ   Survey   Solutions
Problem Set #8 (due by start of lecture 11/06)   FAQ   Survey   Solutions
Problem Set #9 (due by start of lecture 11/13)   FAQ   Survey   Solutions
Problem Set #10 (due by start of lecture 11/27)   FAQ   Survey   Solutions
Problem Set #11 (due by start of lecture 12/04)   FAQ   Survey   Solutions

Lab Assignments

In-Lab Assignment #0 (for week of 08/27)
In-Lab Assignment #1 (for week of 09/03)
In-Lab Assignment #2 (for week of 09/10)
In-Lab Assignment #3 (for week of 09/17)
In-Lab Assignment #4 (for week of 09/24)
In-Lab Assignment #5 (for week of 10/01)
In-Lab Assignment #6 (for week of 10/08)
In-Lab Assignment #7 (for week of 10/15)
In-Lab Assignment #8 (for week of 10/29)
In-Lab Assignment #9 (for week of 11/05)
In-Lab Assignment #10 (for week of 11/12)
In-Lab Assignment #11 (for week of 11/26)
In-Lab Assignment #12 (for week of 12/03)

Pop Quizzes

Pop Quiz #1   Solution / Model   Post-Mortem
Pop Quiz #2   Solution   Model   Post-Mortem
Pop Quiz #3   Solution / Model   Post-Mortem
Pop Quiz #4   Solution / Model   Post-Mortem
Pop Quiz #5   Solution / Model   Post-Mortem
Pop Quiz #6   Post-Mortem

Midterms / Final

Midterm Exam #1 (R, 18 OCT, in lecture)
Information Sheet
Study Materials:
    Java Reference Sheet
    Review Problems Handout from Lecture #15
    Sample Exam from Fall 2006 and Solutions and Post-Mortem
    Sample Exam Problems from Spring 2006 and Solutions
    Self-Test Questions with Answers
Fall 2007 Exam, Solution/Model, Post-Mortem
Midterm Exam #2 (T, 20 NOV, in lecture)
Information Sheet
Study Materials:
  Java Reference Sheet
  Review Problems eHandout from Lecture #23
  Sample Exam from Fall 2006 and Solutions and Post-Mortem
  Sample Exam A from Spring 2006 and Solutions
  Sample Exam B from Spring 2006 and Solutions
  Self-Test Questions with Answers
Fall 2007 Exam, Solution/Model, Post-Mortem
Final Exam (R, 13 DEC, 4:00-7:00pm, in class)
Note: our final will be longer than each midterm and comprehensive (unlike the Sample Exams provided below)
Information Sheet
Study Materials:
  All the materials for Midterm Exam #1 above
  All the materials for Midterm Exam #2 above
  Java Reference Sheet
  Review Problems eHandout from Lecture #28
  Sample Exam A from Spring 2006 and Solutions
  Sample Exam B from Spring 2006 and Solutions
  Self-Test Questions with Answers
Post-Mortem

Useful/Fun Links

Course Resources
MediaVision site (contains videos of each lecture)
Companion Website for Liang's Intro to Java: Fundamentals First
Liang's Supplements

Team Case Urban Challenge site; Photos of Dexter
PathCase Bioinformatics Tool; System/Pathway Figures

Extra HTML Links
HTML Code Tutorial
Quick List of Tags, with Pop-Up Examples

Downloading DrJava [and Java (JDK 5 or 6)]
DrJava development environment
Installing Java and DrJava on your own machine
If you wish, you can also look Liang's Supplement VI-A (follow link to Supplements in "Course Resources" above)

WikiHow: How to Say Hello in Different Languages
Altavista's Babelfish
WikiBooks' collection of hello world programs [Courtesy of Toby Waite]; alternate site
Prof. Branicky's Tower of Babel

Why Java?
Java: The Early Years
Java in cars and on Mars
Applets
Minesweeper
John Conway's Game of Life
Example Applets
Libraries, graphical interfaces (2-D and 3-D)
Java API documentation
[see Liang 1.11] Sun's JOptionPane Class documentation (first hit on Google search using [JOptionPane], accessed 08/29/2007)
Java 3D enabled CAVE: Goto Visual Genomics, also, then click on "Resources --> CAVE"
Java Wear?
Average
Donald Knuth (Case, Class of 1960; arguably the most famous computer scientist of all time)
Bits, Bytes, and all that
Hex to Decimal and Binary Converter
ASCII Conversion Table

Mathworld: Sphere
Sun's Math Class documentation

Nesting Dolls

Talking Turtle with Seymour Papert
Python Turtle Tutorial
Python Turtle graphics library
Main Python Site:   documentation   |   download

DrJava Debugger
Weird Debugger Behavior (Buttons grayed out? Exits?):
Try "Reset", "Debug Mode", "Run". Alternatively, use java classname in the Interactions Pane.
Note: You can debug single methods (other than main). Use classname.methodname(methodargs)

Street Writer

Game Programming Seminar (Fri, Oct. 5, 11:30am-12:30am, Bingham 103)

Gone Nutty starring Scrat from Ice Age

Loading/Saving Images using Java's Image I/O Library
Graphics file format summary
500 RGB and HEX color codes
More RGB and hex color codes

Netflix Prize: Home

Good Luck!

Sun's String Class documentation
Unicode Charts,   Basic Latin Chart

SimCity Societies
YouTube
Period Table of Elements: Simple, More Complete, Same but Bigger

Sun's Class JFrame Documentation
Sun's Class Graphics Documentation

JavaScript Demos
JavaScript Tutorial
JavaScript Examples


Created: 2007-08-26. Last Modified: 2007-12-16. © Michael S. Branicky