CS100M --> Lecture Materials

Selected lecture slides, computer code from lecture, lecture handout, MATLAB chapter files (CFile), and the associated reading from the textbook Absolute Java by Savitch are listed here. Typically, lecture handouts are sketches of the lectures and may contain example programs that are too long for students to copy in class. Lecture handouts are not complete transcripts of the lectures. You are expected to attend lecture and to take notes for yourself.

 

Date Topics Slides / Handouts Program Examples Reading
1/24
T
Intro to CS100 Syllabus
introSP06.pdf
  CFile 1  
Sec 1.1
1/26
R
Variable & assignment, input, fprintf, sequential execution h0126.pdf diffArea.m
sphereArea.m
CFile 1 
Sec 1.2
1/31
T
Max & min, branching (if-else) h0131.pdf   CFile 1 
Sec 1.3
2/2
R
More branching, Logical operators and values h0202.pdf   CFile 1 
Sec 1.4
2/7
T
Iteration using for, while h0207.pdf oneThrow.m
throw.m
harmonic.m
mantissaTest.m
CFile 2 
Sec 2.1 - 2.4
2/9
R
Iteration using while; review on developing algorithms h0209.pdf getMax.m
getMode.m
timesTable.m
CFile 3
2/14
T
User-defined functions h0214.pdf   CFile 4
2/16
R
User-defined functions, random numbers, review h0216.pdf coords.m
game.m
hsum.m
printFlips.m
No new reading
2/21
T
One-dimensional array-vector, easy plots in MATLAB h0221.pdf csum.m
maximum.m
polyEval.m
randomWalk.m
CFile 5
Sec 5.1
2/23
R
Characters and strings h0223.pdf capitalize.m
toUpper.m
CFile 5
Sec 5.2
2/28
T
Two-dimensional array--matrix, file input/output (I/O) h0228.pdf minInMatrix.m
minInNeighborhood.m
CFile 9
Sec 9.1
3/2
R
Vectorized code, pre-allocating arrays, logical arrays h0302.pdf pairSum.m
charCount.m
timing.m
CFile 9
Sec 9.2
3/7
T
Simulation, MATLAB wrap-up h0307.pdf approxPi.m
rollDie.m
CFile 9
Sec 9.3
3/9
R
Review & Examples h0309.pdf   No new reading
3/14
T
Parts of a Java program; types; variable, declaration and assignment; DrJava demo h0314.pdf Earth.java
Mystery.java
Chapter 1 (exclude pp 36-42 on Classes & String methods)
Sec 2.1
3/16
R
Selection (conditional) statement, input using Scannerclass, while loop h0316.pdf MinQuadratic.java
MyRandom.java
Sec 2.2, Sec 3.1 (exclude pp104-109), Sec 3.2 (exclude pp112-114), pp 130-135 of Sec 3.3 (exclude the do-while loop)
3/28
T
Review methods (functions), Iteration with for loop, Intro to objects and classes h0328.pdf MyRandom.java Reading: pp 136-145 of Sec 3.3, pp 36-42, pp 112-115
3/30
R
Intro to objects and classes, Creating objects and calling their methods, OO thinking h0330.pdf   start reading Sec 4.1
4/4
T
OO thinking
Defining a class:
-Instance variables and methods
-Constructors
-Method toString
h0404.pdf Interval.java Sec 4.1, 4.2
4/6
R
Defining a class:
-Constructors
-Keyword this
-Method toString
h0406.pdf   Sec 4.4
4/11
T
Defining a class:
-Non-primitive type parameters
-Static variables and methods
-Method overloading
h0411.pdf Interval.java Sec 4.3, Sec 5.1
Optional reading: Sec 5.2
4/13
R
Wrap up Interval class, Review with Person class,1-d array h0413.pdf Person.java Sec 6.1, pp 382-386 of Sec 6.3
4/18
T
Linear search, Selection sort, Binary search (to be discussed in section), 1-d array of objects h0418.pdf ManyIntervals1.java
SortNum.java
Sec 6.2
4/20
R
Inheritance—extending a class h0420.pdf Dice.java
Interval.java
ManyIntervals.java
TrickDice.java
Sec 7.1
4/25
T
Overriding methods, Using super to access members from the superclass, What is “polymorphism”? h0425.pdf   Sec 7.2. Optional: Sec 7.3
4/27
R
Polymorphism, Object class, abstract h0427.pdf Bathroom.java
House.java
Room.java
Sec 8.1, 8.2
5/2
T
2-d array h0502.pdf Array2d.java
Array2dCom.java
Sec 6.4
5/4
R
2-d array of objects—a String is an object, Review arrays of objects (1- and 2-d) h0504.pdf Cubicle.java
CubicleWorld.java
MatrixOps.java
Review String methods on pp 37-44. (No need to memorize
the methods! Just be aware of the kinds of String methods
available for future reference.)