CS100M --> Lecture Materials

Selected lecture slides, computer code from lecture, lecture handout, MATLAB chapter files (CFile), and the associated reading from the textbook Starting out with Java 5: from control structures to objects by Gaddis 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/23
T
Intro to CS100 introSP07.pdf   CFile 1
Sec. 1.1
1/25
R
Variable & assignment, input, fprintf, sequential execution h0125.pdf spiral.m
sphereArea.m
diffArea.m
CFile 1 
Sec 1.2
1/30
T
Max & min, branching (if-else) h0130.pdf   CFile 1 
Sec 1.3
2/1
R
More branching, Logical operators and values h0201.pdf   CFile 1 
Sec 1.4
2/6
T
Iteration using for, while; Floating point numbers h0206.pdf initTarget.m
oneThrow.m
manyThrows.m
CFile 2 
Sec 2.1 - 2.4
2/8
R
Iteration using while; nested loops; review on developing algorithms h0208.pdf maxExample.m 
modeExample.m
timesTable.m
CFile 3
2/13
T
User-defined functions h0213.pdf   CFile 4
2/15
R
  Class Canceled    
2/20
T
User-defined functions, random numbers h0220.pdf game.m CFile 4
2/22
R
One-dimensional array-vector, easy plots in MATLAB h0222.pdf average.m
maximum.m
csum.m
polyEval.m
randomWalk.m
CFile 5
Sec 5.1
2/27
T
Easy plots in MATLAB, Array of characters—string h0227.pdf capitalize.m
toUpper.m
makeCircle.m
CFile 5
Sec 5.2
3/1
R
Two-dimensional array--matrix h0301.pdf   CFile 9
Sec 9.1, 9.2
3/6
T
Vectorized code, simulation h0306.pdf   Cfile 9
Sec 9.3
3/8
R
Pre-allocating arrays, logical arrays, review h0308.pdf   -
3/13
T
Parts of a Java program; types; variable, declaration and assignment; DrJava demo h0313.pdf Earth.java
Mystery.java
Chapter 2
Optional reading: Chapter 1
3/15
R
Selection (conditional) statement, while loop, for loop, static methods, input using Scannerclass h0315.pdf MinQuadratic.java
MyRandom.java
Sec 3.1-3.5, 3.7, 3.11; Sec 4.1-4.3, 4.5-4.7
3/27
T
Methods, Scope of a variable, Intro to objects and classes h0327.pdf MyRandom.java Chapter 5 (Pay extra attention to Sec 5.2)
3/29
R
Intro to objects and classes, Creating objects and calling their methods, OO thinking h0329.pdf   Sec 6.1, 6.6
4/3
T
OO thinking
Defining a class:
-Instance variables and methods
-Constructors
h0403.pdf Interval.java 6.2-6.5
4/5
R
Defining a class:
-Constructors
-Keyword this
-Method toString
h0405.pdf Car.java
Client.java
Sec 9.1-9.8
4/10
T
Defining a class:
-Non-primitive type parameters
-Static variables and methods
-Method overloading
h0410.pdf Interval.java Sec 9.10, 9.11, Sec 8.1
4/12
R
Wrap up Interval class, Review with Person class,1-d array h0412.pdf Person.java Sec 8.1-8.5, “Enhanced for-loop” in Sec 8.2 is optional
4/17
T
Linear search, Selection sort, Binary search (to be discussed in section) h0417.pdf SortNum.java Sec 8.6-8.8, 8.11
4/19
R
1-d array of objects, Inheritance—extending a class h0419.pdf Interval.java
ManyIntervals.java
Sec 11.1, 11.2, 11.4, 11.5
4/24
T
Extending a class: Overriding methods, Using super to access members from the superclass h0424.pdf Dice.java
TrickDice.java
Sec 11.3, 11.6, 11.7
4/26
R
Polymorphism, Object class, abstract h0426.pdf Room.java
Bathroom.java
House.java
Sec 11.8
5/1
T
2-d array h0501.pdf   Sec 8.9 (8.10 optional)
5/3
R
2-d array of objects—a String is an object, Review arrays of objects (1- and 2-d) h0503.pdf Cubicle.java
CubicleWorld.java
MatrixOps.java
Review type String in Sec 2.9
Sec 10.3 (No need to memorize the methods! Just be aware of the kinds of String methods available for future reference)