CS100M --> Lecture Materials

Selected lecture slides, computer code from lecture, lecture handout, MATLAB chapter files (CFile), and the associated reading from the textbook Java Software Solutions by Lewis and Loftus (JV) 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
8/25 R Intro to CS100 Syllabus
introFA05.pdf
  CFile 1 Sec 1.1
8/30 T Variable & assignment, input, fprintf, sequential execution h0830.pdf diffArea.m
sphereArea.m
CFile 1 Sec 1.2
9/1
R
Max & min, branching (if-else) h0901.pdf - CFile 1 Sec 1.3
9/6
T
More branching, Logical operators and values h0906.pdf quadMin.m CFile 1 Sec 1.4
9/8
R
Iteration using for, while h0908.pdf area.m
area6.m
ave10.m
CFile 2 Sec 2.1 - 2.4
9/13
T
Iteration using while; review on developing algorithms h0913.pdf areaCircle.m
areaIndef.m
table.m
CFile 3 Sec 3.1, 3.2
9/15
R
User-defined function h0915.pdf dotsInCircles.m
drawColorDot.m
polar2xy.m
randDouble.m
triangle2.m
CFile 4 Sec 4.1, 4.2
9/20
T
User-defined function, random numbers, review h0920.pdf dots.m
drawColorDot.m
polar2xy.m
randDouble.m
randomWalk1.m
-
9/22
R
One-dimensional array-vector, easy plots in MATLAB h0922.pdf evalPoly.m
randomWalk.m
CFile 5 Sec 5.1
9/27
T
Characters and strings h0927.pdf caps.m
randomCrawl.m
toUpper.m
CFile 5 Sec 5.2
9/29
R
Two-dimensional array--matrix, file input/output (I/O) h0929.pdf buildA.m
minInMatrix.m
minInNeighborhood.m
reflectA.m
transposeA.m
CFile 9 Sec 9.1, Sec 9.2
10/4
T
Vectorized code, pre-allocating arrays, logical arrays h1004.pdf approxPi.m review Chapter 5
10/6
R
Simulation, MATLAB wrap-up h1006.pdf rollDie.m
rollUnfairDie.m
timing.m
-
10/13
R
Parts of a Java program; types; variable, declaration and assignment; DrJava demo h1013.pdf Mystery.java
Earth.java
Chapter 1 (exclude pp 36-42 on Classes & String methods)
Sec 2.1
10/18
T
Selection (conditional) statement, input using Scannerclass, while loop h1018.pdf Eeee.java
Eeee_1while.java
MinQuadratic.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)
10/20
R
Methods (functions), Intro to objects and classes h1020.pdf MyRandom.java
Prelim2Q1a.java
-
10/25
T
Intro to objects and classes, Creating objects and calling their methods, OO thinking h1025.pdf   pp 36-42, 112-115, start reading
Sec 4.1
10/27
R
 OO thinking, Defining a class:, Instance variables, Instance methods, Constructors h1027.pdf Interval.java Sec 4.1, 4.2
11/1
T
OO thinking and Defining a class:
-Instance variables
-Instance methods
-Getters and setters
h1101.pdf Interval.java Sec 4.4, start reading Sec 5.1
11/3
R
Defining a class:
-Static variables and methods
-Method overloading
h1103.pdf Interval.java
IntervalClient.java
Sec 4.3, Sec 5.1
11/8
T
-Wrap up Interval and Person classes
-1-d array
-Selection sort
-Linear search
-Binary search (will discuss in section)
h1108.pdf Person.java
SortNum.java
Sec 6.1, pp 382-386 of Sec 6.3
11/10
R
Selection sort, 1-d array of objects h1110.pdf ManyIntervals.java
SortNum.java
Sec 6.2
11/15
T
Inheritance—extending a class h1115.pdf Dice.java
TrickDice.java
Sec 7.1
11/17
R
Overriding methods, Using super to access members from the superclass, What is “polymorphism”? h1117.pdf Dice.java
TrickDice.java
Sec 7.2. Optional: Sec 7.3
11/22
T
Polymorphism, Object class, abstract h1122.pdf Bathroom.java
House.java
Room.java
Sec 8.1, 8.2
11/29
T
2-d array h1129.pdf Array2d.java Sec 6.4
12/1
R
2-d array of objects—a String is an object, Review arrays of objects (1- and 2-d) h1201.pdf MatrixOps.java
Cubicle.java
CubicleWorld.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—not for the CS100M exam.)