# | Assigned | Homework |
---|---|---|
1 | June 4 |
Practice with Interfaces
FinalGiven: Comparable.java Growable.java Maxima.javaTo be completed: Animal.java Employee.java Utility.java Codecheck submission URL (best to open in Firefox) Canvas: Homework 1 final Due Monday, June 8 at 11:59 PM Possible solutionFinal: hw1-final-solution.zip |
2 | June 9 |
Practice with Scanner
DraftGiven: CounterTester.javaTo be completed: Counter.java Codecheck submission URL Canvas: Homework 2 draft Due Wednesday, June 10 at 11:59 PM FinalGiven: CharacterStats.java CounterTester.javaTo be completed: Counter.java Codecheck submission URL Canvas: Homework 2 final Due Friday, June 12 at 11:59 PM Possible SolutionsDraft: hw2-draft-solution.zipFinal: hw2-final-solution.zip |
3 | June 11 |
Generate a Detail Report from a CSV File
DraftGiven: widgets.csv To be completed: Widgets.javaDraft output detail report: widgets.out Codecheck submission URL Canvas: Homework 3 draft Due Saturday, June 13 at 11:59 PM FinalGiven: widgets.csv To be completed: Widgets.javaFinal output detail report: widgets.out Codecheck submission URL Canvas: Homework 3 final Due Monday, June 15 at 11:59 PM Possible SolutionsDraft: hw3-draft-solution.zipFinal: hw3-final-solution.zip |
4 | June 16 |
Generate a Personnel Report from a CSV File
DraftGiven: Personnel.java personnel.csvDraft output personnel report: personnel.out Codecheck submission URL Canvas: Homework 4 draft Due Thursday, June 18 at 11:59 PM FinalGiven: Personnel.java personnel.csvFinal output personnel report: personnel.out Codecheck submission URL Canvas: Homework 4 final Due Monday, June 22 at 11:59 PM Possible SolutionsDraft: hw4-draft-solution.zipFinal: hw4-final-solution.zip |
5 | June 25 |
Recursion
Final(There is no draft.)Codecheck submission URL for read() Codecheck submission URL for allSame() Codecheck submission URL for count() Codecheck submission URL for append() Canvas: Homework 5 final Due Monday, June 29 at 11:59 PM Possible Solutionhw5-final-solution.zip |
6 | June 30 |
Mutual Recursion Calculator
Final(There is no draft.)Codecheck submission URL Canvas: Homework 6 final Due Monday, July 6 at 11:59 PM Possible Solutionhw6-final-solution.zip |
7 | July 7 |
Quicksort
DraftPartitioning tracer output: partitiontracer.outCodecheck submission URL for partitioning tracer Quicksort tracer output: sorttracer.out Codecheck submission URL for quicksort tracer Canvas: Homework 7 draft Due Wednesday, July 8 at 11:59 PM Possible Solutionhw7-draft-solution.zipFinalGiven: Presidents.java presidents.txtNames output: names.out Codecheck submission URL Canvas: Homework 7 final Due Friday, July 10 at 11:59 PM Possible Solutionhw7-final-solution.zip |
8 | July 16 |
Java Collections Framework
FinalInput file: GettysburgAddress.txtCodecheck submission URL Canvas: Homework 8 final Due Monday, July 20 at 11:59 PM Possible SolutionUniqueWords.java output.txt |
9 | July 21 |
Linked Lists
DraftCodecheck submission URLCanvas: Homework 9 draft Due Friday, July 24 at 11:59 PM Possible SolutionAbbreviatedLinkedList.javaFinalCodecheck submission URLCanvas: Homework 9 final Due Monday, July 27 at 11:59 PM Possible SolutionAbbreviatedLinkedList.java |
10 | July 30 |
Huffman Coding
FinalInput file: GettysburgAddress.txtOutput file: output.txt Codecheck submission URL Canvas: Homework 10 final Due Wednesday, August 5 at 11:59 PM Possible Solutionhw10-final-solution.zip |
Date | Content |
---|---|
June 2 |
Slides:
Learning outcomes; classes are types; class hierarchies;
variation in behavior vs. variation in value; shadowing
instance variables; substitution principle; superclass
construction; call a superclass method; Object class;
polymorphism; polymorphic self calls
Example polymorphism: Animal.java Mammal.java Lion.java Dog.java Print.java |
June 4 |
Slides:
Overriding toString() and equals(); dangerous typecasts;
instanceof; getClass(); interfaces; define and implement
a Java interface; an interface is a type; interface
variables; Comparable interface; implement multiple
interfaces; Homework #1-Final
Example no override: Employee.java EmployeeTester.java Example override: Employee.java Manager.java EmployeeTester1.java EmployeeTester2.java Example equals(): Employee.java Manager.java EmployeeTester.java Example typecast: Employee.java EmployeeTester.java Example instanceof: Employee.java EmployeeTester.java Example getClass(): Employee.java EmployeeTester.java |
June 9 | Slides: Class hierarchy puzzle; interfaces and subclasses; instanceof; feed our pets; marker interfaces; avoid biters; interface constants; objects and interfaces; reading and writing text files; Scanner; PrintWriter; close I/O files; read words, characters, lines, and numbers; classify characters; handle I/O errors; exception handing; FileNotFoundException; finally clause; Homework #2 |
June 11 | Slides: What Scanner considers to be a word; Homework #3; throw an exception; exceptions hierarchy; catch an exception; catch multiple exceptions; explicitly throw an exception; custom exceptions; checked vs. unchecked exceptions |
June 16 | Slides: What makes software good; how to achieve good design; iterative process; poor design not a failure; application development big picture; iterative and incremental development; sources of classes; categories of classes; class responsibilities; relationships: dependency and aggregation; multiplicity; aggregation vs. inheritance; CRC technique; Assignment #4 |
June 18 | Slides: UML diagrams; class diagram; relationships; multiplicities; aggregation; composition; how good is your design?; UML in-class exercise; review for Midterm #1 |
June 25 |
Slides:
Midterm #1 solutions; recursion; how to think recursively;
factorials; recursive multiplication; iterative and
recursive fibonacci; recursive member of; recursive
unique; recursive reverse; Towers of Hanoi; Homework #5
Example recursive methods: Factorial.java Multiplier.java Fibonacci.java FibonacciRecursive.java FibonacciTrace.java Member.java Unique.java Reverse.java Hanoi.java |
June 30 | Slides: Mutual recursion; syntax diagrams and syntax trees for arithmetic expressions; expresssion; term; factor; trace of (3 + 4)*5; Homework #6; selection sort; performance; count element visits; analyze performance; big-Oh; find the most frequent element; merge sort |
July 2 |
Slides:
Merge sort; merge vs. selection sort; proof that merge sort is O(n log n); quicksort;
partitioning strategy; how to partition; sorting animations
Example selection sort: SelectionSorter.java SelectionSortDemo.java ArrayUtil.java Example merge sort: MergeSorter.java MergeSortDemo.java ArrayUtil.java Example quicksort: QuickSorter.java QuickSortDemo.java ArrayUtil.java |
July 7 | Slides: Homework #6 solution; Homework #7; binary search: recursive and non-recursursive; sorting and searching in the real world; built-in sort routines; Arrays.sort(); Collections.sort(); Comparable as a parameterized interface; sorting challenges; Comparator interface; growth order |
July 9 | Slides: Java collections framework; List interface; Stack; Queue; Set; Map; Collections methods; linked lists; LinkedList class; list iterators; review for midterm #2 |
July 14 | Slides: Midterm #2 |
July 16 | Slides: Midterm #2 solutions; Java collections framework; sets: HashSet and TreeSet; maps: HashMap and TreeMap; stacks; queues; priority queues; Homework #8 |
July 21 | Slides: Homework #8 solution; linked list class; add/remove the first element; iterator class; advance the iterator; add/remove/set an element; remove the last element; doubly linked list; add/remove the first/last element; bidirectional iterator; Homework #9 |
July 23 |
Slides:
Linked list with and without an iterator; arrays; array
list implementation: insert, remove, grow the internal
array; array list vs. linked list; stack implementation:
linked list and array list; queue implementation: linked
list and array; circular array; stack and queue efficiency
No iterator linked list: LinkedListNoIterator.java |
July 28 | Slides: Hash tables; hash codes; collision resolution: separate chaining; find, add, and remove an element; iterate; load factor; hash table performance; linear and quadratic probing; built-in Java hashing support; hash code for string; tree; tree terms; hierarchical data; tree implementation; binary tree; decision tree; binary tree implementation |
July 30 | Slides: Homework #9 solutions: iterative and recursive; Huffman encoding; building a Huffman tree; encoding map; Homework #10; binary search tree: search, insert, remove |
Aug 4 | Slides: Tree traversals: inorder, preorder, postorder; visitor interface; depth-first search; breadth-first search; tree iterators; breadth-first iterator; review for the final |
|
A grade C- or better for each course. Department policy is to enforce all course prerequisites strictly. |
Big Java Early Objects, 5th ed. Cay Horstmann Wiley ISBN: 978-1-118-43111-5 Errata: http://www.horstmann.com/bigj5/bugs.html |