Schedule - CS 312 - Fall 2012


This schedule, and the links contained in it, are subject to change during the semester.

Date Topic Reading and Assignments
Reading Assignments are from the required textbook, Building Java Programs by Reges and Stepp, unless otherwise noted. Read the assignments before class.
Wed Aug 29 Syllabus and Course Introduction

Link to Notes:
Intro to cs 312
Frog and Toad Puzzle


1.Read the course syllabus carefully.
2. Read sections 1.1 - 1.3 in the book.
3. Apply for your lab account today - see the syllabus for more details.

4. Read Advice for CS Undergrads (from Joel on Software)
5. Watch Randy Pausch's time management talk
6. Create a Practice-It account - add yourself to the CS 312 class (at either 10 or 11) on Practice-it
7. Register your iClicker2

Program 1 assigned.
You will start, and hopefully complete, this first assignment in the lab during next Thursday's discussion section. If you finish the assignment before discussion, you do not need to attend the first discussion section meeting.

Thurs Aug 30
No discussion section meeting today. Discussion section meetings will begin next week. Apply for your lab account now.

Fri Aug 31
pre-test/quiz 1
The CS 312 pre-test will be given in lecture today.
Mon Sept 3
Labor Day holiday - no class

Wed Sept 5
Computers and Languages
How Java Works
Basic Java Programs
Lecture 1
  1. Read sections 1.4-1.5.
  2. Practice-It! exercises: 1.1 Stewie, 1.5 Stewie2
  3. Puzzler of the Day
  4. An example algorithm
Thurs Sept 6
optional discussion section - attend if you need help with class software or lab 1
Today only: all discussion sections will meet in the PAI 5.35 lab.
Fri Sept 7
Simple Java Programs
Comments in Java
Algorithms
Static Methods and Procedural Decomposition
Notes in ppt and pdf
1. Ch 1 self-check problems: 5, 7, 13, 15, 16, 17, 19
2. Practice-It! exercises: 1.6 DrawEgg
3. Puzzler of the Day
Mon Sept 10
Procedural Decomposition and static methods example
1. Re-read the case study in section 1.5.
2. Puzzler of the Day
3. Practice It! exercises: 1.10 Shining
Wed Sept 12
Procedural Decomposition - Case Study Solution
Data Types, Variables, Arithmetic operators
Notes in ppt and pdf

1. Read 2.1-2.2.
2. Chapter 2 self-check problems: 1 - 5, 8-9
3. Remember that you are not allowed to use slip days for lab 1.

Thurs Sept 13
Discussion section:
Discussion assignment - algorithms, practice with println(), static methods
Quiz likely
1. Review the case study that we did in class.
Friday Sept 14
Variables, Arithmetic operators, string manipulation
1. Read 2.3-2.4.
2. Practice It! exercises: 2.4: expressions 3

Mon Sept 17
Increment and decrement operators, assignment operators
for loops

Notes in ppt and pdf
1. Finish reading chapter 2.
2. Practice It! exercises: 2.2: loop squares
3. Puzzler of the Day
4. Chapter 2 self-check problems: 10 - 13
5. Quiz likely
Wed Sept 19
for loops
1. Chapter 2 self-check problems: 16, 19
2. Practice It! exercise: 2.5 star triangle
Thurs Sept 20

Discussion
  1. Discussion assignment 2
  2. Practice with arithmetic operators and loops
  3. Quiz likely
  4. In-class exercises
Fri Sept 21
nested loops
class constants
first look at user input

Notes:
nested: ppt and pdf
constants: ppt and pdf
scanner: ppt and pdf
1. Ch 2 self-check problems: 22, 24-26
2. Practice It! exercises: 2.6 number triangle, 2.7 spaced numbers
3. Ch 3 self-check: 16-19
4. Read 3.4, pages 152-154
Mon Sept 24
case study: nested loops
pseudocode

Notes: ppt and pdf
Interactive Program Examples
In-class example: XBoxPart1.java
1. Ch 2 self-check: 27-28
2. Ch 2 exercises: 6-9, 13-15
3. Practice It! exercise:3.7: printStrings, 2.15 print design
Wed Sept 26
parameters
method overloading
the Math class
return values
Scanner review

Notes: ppt and pdf
In-class examples:
BoxHeroes.java, SumInt.java
1. Ch 3 self-check: 1, 2, 4
2. Practice It! exercises: 3.10 mathExpressions, 3.5 parameterMysteryTouch
3. Read 3.1-3.2
Thurs Sept 27
Discussion
1. Finish the assignment for last week: 1bcd, 2, 5, 6
2. quiz
Fri Sept 28
Using objects
String, Scanner, Random and Point objects
User input
non-static methods
Parameter Review

Notes: ppt and pdf

1. Finish reading chapter 3
2. Practice It: 3.4 parameterMysteryWho
3. JavaBat exercises (Create an account first, and set up teacher share with your TA. List your first and last name on your account): Warmup-2 stringTimes, Warmup-2 stringBits
4. Read 3.3-3.4
5. Ch 3 self-check problems: 10-14, 18

Mon Oct 1
More on objects
Introduction to simple graphics

Notes: ppt and pdf
In-class examples:
ReverseString.java
StringPractice.java
SumThem.java
1. Read chapter 3G
2. Self-check exercises: 1, 3
Wed Oct 3
graphics
Conditional Statements

Notes: ppt and pdf
1. Read 4.1-4.2
2. Discussion Assignment for Oct 4
3. The DrawingPanel.java file you will need for graphics.
Thurs Oct 4
Discussion section
1. Quiz 4 likely
2. Q&A on programming project
Fri Oct 5
Conditional Statements

Notes: decisions
1. Read 4.3-4.4
2. JavaBat: Warmup-1 sumDouble, String-1 makeAbba, String-2 doubleChar
3. Practice It! exercises: 4.2s logicExpressions1, 4.6 smallestLargest
4. Midterm 1 review sheet
5. Sample Exam 1 (given Fall 2009)
6. Sample Exam 2 (given Fall 2010)
Mon Oct 8
Conditional execution - case study
1. Finish reading chapter 4
2. Midterm 1 review sheet solutions
Wed Oct 10
Midterm 1 review

Examples from class:
CapFirst.java, FindHappyDay.java, MaxMinAvg.java, ThrowDice.java
1. Read 5.1-5.2
2. Self-check problems, chapter 5: 1-6, 9-11, 22
3. Self-check exercises, chapter 5: 3, 5, 6, 7, 15
4. Practice It! exercises: 5.4 whileLoopMystery2, 5.14 logicExpressions2
5. JavaBat:  Logic-1 squirrelPlay, Logic-1 sortaSum, Logic-1 lastDigit

Thurs Oct 11
Discussion section
1. Quiz likely
2. Review for midterm exam - solve discussion assignment and work review sheet problems before class
Fri Oct 12
Midterm 1,  location TBD
1. Solutions for midterm 1
Mon Oct 15
Decisions
Notes: More conditionals
1. Quiz likely


Wed Oct 17
More decisions
Midterm 1 results discussed
Thurs Oct 18
discussion: midterm 1 returned
1. Discussion assignment: create a javabat account here. Then go to the preference page on the javabat page, and enter your TA's email address. You must list your first and last name with your account. Before you go to discussion, complete the following Javabat problems:
String-1 makeAbba, Logic-1 lastDigit, String-2 countHi
You must complete these programs before you go to discussion section!
As with other discussion assignments, we may count part or all of your assignment as a quiz.
Fri Oct 19
while loops, do while loops
error-checking methods in Scanner class
1. javabat: String-1 minCat, String-2 catDog
2. Practice It exercises: 5.12 printAverage, 5.7 diceSum
Mon Oct 22
More indefinite loops
1. Loop review questions
Wed Oct 24
practice with sentinel loops and the Random class
1. Practice It exercises: 5.6 makeGuesses, 5.2 gcd
2. Read 5.3-5.5.
3. Self-check exercises, chapter 5: 18, 19, 22, 26
4. quiz likely
Thurs Oct 25
discussion
1. Discussion assignment: practice it exercise 5.1 showTwos
Plus the following Javabat exercises:
String-2 bobThere, String-2 mixString, String-3 sumDigits
Also, for discussion: re-work midterm 1 and make sure you understand all the questions
2. quiz likely
3. In-class practice with fencepost loops, while and do-while loops, and sentinel loops.


Fri Oct 26
assertions and program correctness
More on decisions
1. Finish reading chapter 5.
2. Practice with conditionals and loops
Mon Oct 29
while loop case study

Wed Oct 31
File processing - introduction

Programs: FileRead.java, FileStuff.java, FindInt.java
1. Read 6.1-6.2
2. Practice It: 6.6 doubleSpace
Thurs Nov 1
discussion - practice with static methods, assertions and file processing

In class assignment:
Assertions, methods and file input
1. discussion assignment - must be completed by 11:59 on Wednesday evening. Practice-It 6.2 evenNumbers, 6.3 negativeSum, 5.27 assertions1
2. quiz likely
Fri Nov 2
Scanner objects and files
Line-based processing for files
1. Practice It: 6.8 readme1
2. Discussion assignment for next week, part 1: write 3 questions that you think would make good exam 2 questions, and post them on the class piazza by Sunday at 11 pm
3. Read 6.3-6.4
4. Chapter 6 exercises: 5, 6, 7
Mon Nov 5
Arrays, part 1

Practice Problems: Strings, Files, Parameters and Return values
1. Read 6.5, 7.1
2. Discussion assignment for Thursday, Nov 7
3. Chapter 7 self-check (p. 430-431): 1-6, 8, 10-12
4. Complete before Wednesday 11:59:Practice It: 7.13 allLess
5. Complete these before Wednesday at 11:59 -JavaBat: Array-1 firstLast6, Array-1 sameFirstLast
6. Review questions

Wed Nov 7
Arrays, continued
Printing with printf
1. Read 7.2-7.3
2. Complete before discussion tomorrow - JavaBat: Array-1 sum3, Array-1 maxEnd3
Thurs Nov 8
discussion
1. Assignment - in class
Fri Nov 9
More arrays

Mon Nov 12
More arrays

Wed Nov 14
Review for exam 2
1. Midterm 2 review sheet
2. The exam review will be in class on Wednesday and during discussion on Thursday.
3. I recommend that you study for the exam, and then work the problems on the review sheet (on paper, without your notes or a compiler) to test yourself.
4. Sample exam 2
5. A few more practice problems for exam 2, and solutions
Thurs Nov 15
discussion
1. Q & A for midterm 2
2. Midterm 2 review sheet solutions
3. Sample exam 2 solutions
Fri Nov 16
exam 2, location TBD

Mon Nov 19
arrays and command line arguments
multi-dimensional arrays

Notes: command-line args,
multi-dimensional arrays
array notes in pdf
1. Read the section on multi-dimensional arrays in 7.4
2. Practice It: 7.19 matrixAdd, 7.11 isUnique

Wed Nov 21-Fri Nov 23
Thanksgiving holiday - no class Wednesday, Thursday or Friday

Mon Nov 26
More Arrays, ppt and pdf
Classes and objects, part 1
1. Read chapter 8, sections 1-2
2. Chapter 8 self-check: 1-6, and exercises 1-2
3. Practice It: 8.1 manhattanDistance
4. Do this coding bat problem before discussion on Thursday
Wed Nov 28
More objects and classes

Notes: objects and classes, take 2: pdf and ppt
1. Read 8.3-8.5
2. Chapter 8 self-check: 8-11, 13-16, exercises  4
3. Practice It: 8.2 isVertical
Thurs Nov 29
discussion: what to do with your unix account - a short introduction
Topics include: logging in, changing your password, format of unix commands, unix directory structure
1. Quiz likely
Fri Nov 30
creating our own classes
1. Finish reading chapter 8

Mon Dec 3
Creating classes & object-oriented concepts
1. Read 9.1
Wed Dec 5
More on objects and classes
In-class exercise
1. Chapter 8 self-check exercises: 9-13
2. Chapter 9 self-check: 1-3, 6, 10-13
Thurs Dec 6
Discussion:
quiz likely
Practice writing classes
1. teaching assistant evaluations
2. in-class assignment
Fri Dec 7
inheritance, interfaces and polymorphism
1. Read 9.1-9.3
2. Practice It: 9.3 variableDeclarations
3. Practice It (review): 7.7 max
4. Final exam review sheet
5. Final exam review solutions
6. Sample final exam - Fall 2009 and solutions
Mon Dec 10
 dead day
Final exam review session: 1-2:30 pm, PAI 2.48
Tues Dec 11
dead day

Dec 12-15, 17-18
 final exam period
Our final exam: Thursday, Dec 13, 9-12.
If (and only if) you have another exam on Dec 13, 9-12:
Makeup exam: Thursday, Dec 13, 7-10 pm.
You will be able to sign up for the makeup exam in class on Dec 5.