Building Java Programs Outline

Chapter
Topics
General Resources Self-checks Exercises
Chapter 1
println
static methods
video 1-3: Static Methods
video 1-4: Complex Figures

PowerPoint slides

lab

code files
Self-Check 1.2: binary 1
Self-Check 1.3: binary 2
Self-Check 1.6: legal identifiers
Self-Check 1.7: confounding
Self-Check 1.8: Archie
Self-Check 1.9: Shaq
Self-Check 1.11: DoubleSlash
Self-Check 1.12: Sally
Self-Check 1.13: Test of Knowledge
Self-Check 1.15: withoutPrintStatements
Self-Check 1.20: Strange
Self-Check 1.21: Strange2
Self-Check 1.22: Strange3
Self-Check 1.23: Confusing
Self-Check 1.24: Confusing2
Self-Check 1.25: Confusing3
Exercise 1.1: Stewie
Exercise 1.2: Spikey
Exercise 1.3: WellFormed
Exercise 1.4: Difference
Exercise 1.5: MuchBetter
Exercise 1.6: Mantra
Exercise 1.7: Stewie2
Exercise 1.8: DrawEgg
Exercise 1.9: DrawEggs
Exercise 1.10: Rockets
Exercise 1.11: StarFigures
Exercise 1.12: EggStop
Exercise 1.13: Shining
Chapter 2
variables
expressions
for loops
video 2-1: Expressions
video 2-2: Variables/Assignments
video 2-3: For Loop
video 2-4: Nested Loops
video 2-5: Complex Figure

PowerPoint slides

lab

code files
Self-Check 2.1: legal int literals
Self-Check 2.2: Expressions 1
Self-Check 2.3: Expressions 2
Self-Check 2.4: Expressions 3
Self-Check 2.7: last digit expression
Self-Check 2.8: digit expressions
Self-Check 2.9: first second
Self-Check 2.11: values of A,B,C
Self-Check 2.14: loop table
Self-Check 2.16: oddStuff
Self-Check 2.17: numberTotal
Self-Check 2.18: fingerTrap
Self-Check 2.19: howManyLines
Self-Check 2.20: blastOff
Self-Check 2.21: multiplication
Self-Check 2.22: nested loops
Self-Check 2.23: starExclamation1
Self-Check 2.24: starExclamation2
Self-Check 2.25: starExclamation3
Self-Check 2.27: unknown
Exercise 2.1: displacement
Exercise 2.2: loopSquares
Exercise 2.3: fibonacci
Exercise 2.4: starSquare
Exercise 2.5: starTriangle
Exercise 2.6: numberTriangle
Exercise 2.7: spacedNumbers
Exercise 2.8: spacesAndNumbers
Exercise 2.9: waveNumbers40
Exercise 2.10: numbersOutput60
Exercise 2.11: numbersOutputConstant
Exercise 2.12: nestedNumbers
Exercise 2.13: nestedNumbers2
Exercise 2.14: nestedNumbers3
Exercise 2.15: printDesign
Exercise 2.16: SlashFigure
Exercise 2.17: SlashFigure2
Exercise 2.19: Window
Chapter 3
parameters
Scanner
video 3-1: Parameter Mystery
video 3-2: Parameters & Return Values
video 3-3: Strings
video 3-4: Scanner

PowerPoint slides

lab

code files
Self-Check 3.1: Odds
Self-Check 3.2: Weird
Self-Check 3.3: parameterMysteryNumbers
Self-Check 3.4: parameterMysteryWho
Self-Check 3.5: parameterMysteryTouch
Self-Check 3.6: parameterMysterySoda
Self-Check 3.7: printStrings
Self-Check 3.8: termForPrintln
Self-Check 3.10: mathExpressions
Self-Check 3.11: parameterMysteryReturn
Self-Check 3.12: min
Self-Check 3.13: countQuarters
Self-Check 3.14: stringExpressions
Self-Check 3.18: promptMultiplyBy2
Self-Check 3.19: RobertPaulson
Exercise 3.1: printNumbers
Exercise 3.2: printPowersOf2
Exercise 3.3: printPowersOfN
Exercise 3.4: printSquare
Exercise 3.5: printGrid
Exercise 3.6: largerAbsVal
Exercise 3.7: largestAbsVal
Exercise 3.9: distance
Exercise 3.10: scientific
Exercise 3.12: vertical
Exercise 3.13: printReverse
Exercise 3.14: inputBirthday
Exercise 3.15: processName
Supplement 3G
graphics
video 3G-1: Basic Drawing
video 3G-2: Parameterized Drawing

PowerPoint slides

lab

code files
Self-Check 3G.1: drawLineErrors
Self-Check 3G.2: fillRectErrors
Self-Check 3G.3: drawLineRectErrors
Exercise 3G.1: MickeyBox
Exercise 3G.2: MickeyBox2
Exercise 3G.3: ShowDesign
Exercise 3G.4: ShowDesign2
Exercise 3G.5: SquaresA
Exercise 3G.6: SquaresB
Exercise 3G.7: SquaresC
Exercise 3G.8: Triangle
Chapter 4
if/else
return
pre/post
video 4-2: Nested if/else Statements
video 4-3: Factoring if/else
video 4-4: Programming with if/else and Cumulative Sums

PowerPoint slides

lab

code files
Self-Check 4.1: logicalTests
Self-Check 4.2: logicExpressions1
Self-Check 4.5: evenOdd
Self-Check 4.8: contribution
Self-Check 4.17: charMystery
Exercise 4.1: fractionSum
Exercise 4.2: repl
Exercise 4.3: season
Exercise 4.4: pow
Exercise 4.5: printRange
Exercise 4.6: smallestLargest
Exercise 4.7: evenSumMax
Exercise 4.8: printGPA
Exercise 4.9: printTriangleType
Exercise 4.10: average
Exercise 4.11: pow2
Exercise 4.13: printPalindrome
Exercise 4.14: swapPairs
Exercise 4.15: wordCount
Chapter 5
while loops
random
assertions
video 5-1: Random Numbers
video 5-2: Fencepost Loops
video 5-3: Sentinel Loops
video 5-4: Boolean Zen
video 5-5: Assertions

PowerPoint slides

lab

code files
Self-Check 5.1: whileLoops
Self-Check 5.3: whileLoopMystery1
Self-Check 5.4: whileLoopMystery2
Self-Check 5.5: randomRangeABCDE
Self-Check 5.8: doWhileLoops
Self-Check 5.12: printLetters
Self-Check 5.14: logicExpressions2
Self-Check 5.15: isVowel
Self-Check 5.20: whileLoopMystery3
Self-Check 5.27: assertions1
Self-Check 5.28: assertions2
Self-Check 5.29: assertions3
Exercise 5.1: showTwos
Exercise 5.2: gcd
Exercise 5.3: toBinary
Exercise 5.4: randomX
Exercise 5.6: makeGuesses
Exercise 5.7: diceSum
Exercise 5.8: randomWalk
Exercise 5.9: printFactors
Exercise 5.10: hopscotch
Exercise 5.12: printAverage
Exercise 5.13: consecutive
Exercise 5.14: numUnique
Exercise 5.15: hasMidpoint
Exercise 5.16: monthApart
Exercise 5.17: digitRange
Exercise 5.18: swapDigitPairs
Chapter 6
file processing
video 6-1: Token-based Processing
video 6-2: Line-based Processing
video 6-3: Processing Complex Input Files

PowerPoint slides

lab

code files
Self-Check 6.2: scannerDeclaration
Self-Check 6.5: scannerError
Exercise 6.1: boyGirl
Exercise 6.2: evenNumbers
Exercise 6.3: negativeSum
Exercise 6.4: collapseSpaces
Exercise 6.6: doubleSpace
Exercise 6.7: wordWrap
Exercise 6.8: wordWrap2
Exercise 6.9: wordWrap3
Exercise 6.10: stripHtmlTags
Exercise 6.12: printDuplicates
Chapter 7
arrays
video 7-1: Array Simulation
video 7-2: Array Traversal Algorithms
video 7-3-1: Array Shifting Algorithms
video 7-3-2: Tallying with an Array

PowerPoint slides

lab

code files
Self-Check 7.4: numbersArray
Self-Check 7.7: max
Self-Check 7.11: printBackwards
Self-Check 7.13: allLess
Self-Check 7.23: arrayMystery4
Self-Check 7.24: arrayMystery5
Self-Check 7.25: averageLength
Self-Check 7.26: isPalindrome
Exercise 7.1: lastIndexOf
Exercise 7.2: range
Exercise 7.3: countInRange
Exercise 7.4: isSorted
Exercise 7.5: mode
Exercise 7.6: stdev
Exercise 7.7: kthLargest
Exercise 7.8: median
Exercise 7.9: minGap
Exercise 7.10: percentEven
Exercise 7.11: isUnique
Exercise 7.12: priceIsRight
Exercise 7.13: longestSortedSequence
Exercise 7.14: contains
Exercise 7.15: collapse
Exercise 7.16: append
Exercise 7.17: vowelCount
Exercise 7.18: wordLengths
Chapter 8
defining classes
video 8-1: Defining a Class
video 8-2: Constructors
video 8-3: Advanced Instance Methods
video 8-4: Encapsulation

PowerPoint slides

lab

code files
Exercise 8.1: manhattanDistance
Exercise 8.2: isVertical
Exercise 8.3: slope
Exercise 8.4: isCollinear
Chapter 9
inheritance
video 9-1: Interacting with the Superclass
video 9-2: Polymorphism
video 9-3: Interfaces

PowerPoint slides

lab

code files
Self-Check 9.3: variableDeclarations
Exercise 9.1: Marketer
Exercise 9.2: Janitor
Exercise 9.3: HarvardLawyer
Exercise 9.8: MinMaxAccount
Exercise 9.9: DiscountBill
Exercise 9.10: FilteredAccount
Chapter 10
ArrayList
video 10-1: Removing From an ArrayList
video 10-2: Adding To an ArrayList
video 10-3: Implementing Comparable

PowerPoint slides

code files
Self-Check 10.7: maxLength
Exercise 10.2: swapPairs
Exercise 10.3: removeEvenLength
Exercise 10.4: doubleList
Exercise 10.6: minToFront
Exercise 10.7: removeDuplicates
Exercise 10.11: stutter
Exercise 10.12: markLength4
Exercise 10.14: removeShorterStrings
Exercise 10.16: interleave
Chapter 11
collections
video 11-1: List Example
video 11-2: Set Example
video 11-3: Map Example

PowerPoint slides

code files
Exercise 11.2: alternate
Exercise 11.3: removeInRange
Exercise 11.8: maxLength
Exercise 11.9: hasOdd
Exercise 11.10: removeEvenLength
Exercise 11.12: contains3
Exercise 11.13: isUnique
Exercise 11.14: intersect
Exercise 11.15: maxOccurrences
Exercise 11.18: reverse
Exercise 11.19: rarest
Chapter 12
recursion
video 12-1: Recursive Tracing
video 12-2: Implementing a Recursive Function
video 12-3: Implementing a Recursive Method

PowerPoint slides

code files
Self-Check 12.3: mystery1
Self-Check 12.4: mystery2
Self-Check 12.5: mystery3
Self-Check 12.11: mystery4
Self-Check 12.12: mystery5
Exercise 12.1: starString
Exercise 12.2: writeNums
Exercise 12.3: writeSequence
Exercise 12.6: writeSquares
Exercise 12.7: writeChars
Exercise 12.8: multiplyEvens
Exercise 12.9: sumTo
Exercise 12.10: repeat
Exercise 12.11: isReverse
Exercise 12.12: indexOf
Exercise 12.13: evenDigits
Chapter 13
sorting
searching
video 13-1: Binary Search
video 13-2: Sorting
video 13-3: Complexity

PowerPoint slides

code files

Chapter 14
GUIs
video 14-1: GUI Basics
video 14-2: Layout Management
video 14-3: More Components and Events

PowerPoint slides

code files

Chapter 15
implementing
a collection
video 15-1: ArrayIntList: Middle of the List
video 15-2: ArrayIntList: Pre/Post
video 15-3: ArrayIntList: Exception

PowerPoint slides

code files
Exercise 15.4: runningTotal
Exercise 15.6: isPairwiseSorted
Exercise 15.8: longestSortedSequence
Exercise 15.9: removeFront
Exercise 15.10: removeAll
Exercise 15.11: printInversions
Exercise 15.12: mirror
Exercise 15.14: stretch
Chapter 16
video 16-1: Linked List: Working with Nodes
video 16-2: LinkedIntList: Traversal
video 16-3: LinkedIntList: Complex Operation

PowerPoint slides

code files
Exercise 16.1: set
Exercise 16.2: toString
Exercise 16.3: indexOf
Exercise 16.4: min
Exercise 16.5: isSorted
Exercise 16.6: lastIndexOf
Exercise 16.7: countDuplicates
Exercise 16.8: hasTwoConsecutive
Exercise 16.9: deleteBack
Exercise 16.10: stutter
Exercise 16.11: split
Exercise 16.12: transferFrom
Exercise 16.13: removeAll
Exercise 16.14: equals
Exercise 16.15: removeEvens
Exercise 16.16: removeRange
Exercise 16.17: doubleList
Exercise 16.18: rotate
Exercise 16.19: shift
Exercise 16.20: reverse
Chapter 17
binary trees
video 17-1: Binary Tree: Traversal
video 17-2: Binary Tree: Traversal
video 17-3: Binary Tree: x = change(x)

PowerPoint slides

code files
Self-Check 17.4: traversal1
Self-Check 17.5: traversal2
Self-Check 17.6: traversal3
Self-Check 17.11: size
Exercise 17.1: sum
Exercise 17.2: countLeftNodes
Exercise 17.3: countEmpty
Exercise 17.4: depthSum
Exercise 17.5: countEvenBranches
Exercise 17.6: printLevel
Exercise 17.7: printLeaves
Exercise 17.8: isFull
Exercise 17.9: toString
Exercise 17.10: equals
Exercise 17.11: doublePositives
Exercise 17.12: numberNodes
Exercise 17.13: removeLeaves
Exercise 17.15: completeToLevel
Exercise 17.16: trim
Exercise 17.17: tighten
Exercise 17.18: combineWith
Exercise 17.19: inOrderList

Stuart Reges
Last modified: Wed Jan 16 15:49:50 PST 2013