Week 0 General Course Information¶
Week 1 Introduction¶
- 1.1. Welcome to CS2114
- 1.2. Setting Up Your Programming Environment
- 1.3. Java Fundamentals
- 1.4. Java Unit Testing
- 1.5. Style and Documentation: Introduction
- 1.5.1. Overview & Objectives
- 1.5.2. Suggested Reading:
- 1.5.3. Introduction to Style and Documentation
- 1.5.4. The challenge
- 1.5.5. Style Guides
- 1.5.6. Naming: What’s in a name
- 1.5.7. Naming conventions
- 1.5.8. Basics naming rules
- 1.5.9. Source Files and Directories
- 1.5.10. Packages
- 1.5.11. Class
- 1.5.12. Interface
- 1.5.13. Methods
- 1.5.14. Variables
- 1.5.15. Constants
- 1.5.16. Naming Dos and Donts
- 1.5.17. Naming Summary
- 1.5.18. Code Review
- 1.5.19. Interactive: Naming Review
- 1.5.20. Formatting
- 1.5.21. Indentation
- 1.5.22. Formatting for this course / Setting up Eclipse Formatting
- 1.5.23. Line length
- 1.5.24. Braces
- 1.5.25. Spacing after commas and other operators
- 1.5.26. Blank Lines
- 1.5.27. Line breaks and continuation indentation
- 1.5.28. Software Documentation overview
- 1.5.29. JavaDoc Comments
- 1.5.30. Describing a class
- 1.5.31. Documenting public fields/instance variables and static variables
- 1.5.32. Documenting a method
- 1.5.33. Javadoc Tags
- 1.5.34. Other comments
- 1.5.35. Other style matters
- 1.5.36. Use of constants and referenced values vs hard coding
- 1.5.37. Constants
- 1.5.38. Referenced value
- 1.5.39. Access Modifiers and Visibility of classes, fields, and methods
- 1.5.40. Testing methods by passing null params
- 1.5.41. Review Checklist
- 1.5.42. Interactive: Style & Documentation Final Review
- 1.5.43. Related Resources
- 1.6. Python to Java Tutorial
- 1.6.1. Code blocks
- 1.6.2. Semi-colons
- 1.6.3. Variable types
- 1.6.4. Instance variables
- 1.6.5. Method return types
- 1.6.6. Constructors
- 1.6.7. Access control modifiers
- 1.6.8. Scope
- 1.6.9. Conditional and loop syntax
- 1.6.10. Function and method syntax
- 1.6.11. Printing (for debugging)
- 1.6.12. Comments:
- 1.6.13. Booleans:
- 1.6.14. Logical operators:
- 1.6.15. Object comparison:
- 1.7. Placeholder
- 1.8. Programming Practice 2
Week 2 Java Review¶
- 2.1. Exceptions
- 2.1.1. Objectives
- 2.1.2. Interactive: Exception Handling
- 2.1.3. Reflecting on Checked and Runtime(Unchecked) Exceptions
- 2.1.4. Checkpoint 1
- 2.1.5. Interactive: Exception Handling with try, catch, and finally
- 2.1.6. Handling the Exception Later on with throws
- 2.1.7. Exception Handling Examples - Basic to Complex
- 2.1.8. Implementing and Testing Exceptions
- 2.1.9. Checkpoint 2
- 2.2. Polymorphism
- 2.2.1. Objectives
- 2.2.2. Interactive: Introduction to Object Oriented Programming
- 2.2.3. Checkpoint 1
- 2.2.4. Interactive: Java UML Diagrams
- 2.2.5. Programming Practice: Object Oriented Programming
- 2.2.6. Interactive: Java Inheritance: this, super
- 2.2.7. Checkpoint 2
- 2.2.8. Interactive: Java Inheritance: equals(), toString()
- 2.2.9. Checkpoint 3
- 2.2.10. Interactive: Polymorphism Measurable Interface
- 2.2.11. Checkpoint 4
- 2.2.12. Programming Practice: Polymorphism 1
- 2.2.13. Interactive: Polymorphism Computer Superclass
- 2.2.14. Checkpoint 5
- 2.2.15. Interactive: Polymorphism Integer Example
- 2.2.16. Programming Practice: Polymorphism 2
- 2.3. Java Arrays
- 2.4. Generics Intro
- 2.5. Lab 2 Polymorphism
- 2.6. Lab 2 Polymorphism PostLab
- 2.7. MUSIC Survey 1
- 2.8. Knowledge Practice 2
- 2.9. Programming Practice 2
Week 3 Bags¶
- 3.1. Bags
- 3.1.1. Objectives
- 3.1.2. Introduction to Bags
- 3.1.3. Documentation of Bag Interface methods
- 3.1.4. Interactive: Documentation of Bag Interface Methods
- 3.1.5. Interactive: Using Bags
- 3.1.6. Checkpoint 1
- 3.1.7. Programming Practice: ArrayBags
- 3.1.8. Array Implementation of Bags
- 3.1.9. Checkpoint 2
- 3.1.10. Demo More bag method implementation
- 3.1.11. Checkpoint 3
- 3.1.12. Methods that Remove and Design Improvement Lesson and Demo
- 3.1.13. Checkpoint 4
- 3.1.14. Interactive: Array resizing description and coding Demo
- 3.1.15. Tradeoffs of using an array implementation for a bag
- 3.1.16. Programming Practice: The Bag Interface
- 3.2. Lab 3 Movie Database
- 3.3. Lab 3 Movie Database Post Lab
- 3.4. Project 1
- 3.5. Knowledge Practice 3
- 3.6. Programming Practice 3
Week 4 Linked Chains, Bags Continued¶
- 4.1. Assessment 1 Info
- 4.2. Linked Chains (Pointers)
- 4.2.1. Objectives
- 4.2.2. Reference Variables
- 4.2.3. Interactive: Intro to Linked Chains of Nodes
- 4.2.4. Checkpoint 1
- 4.2.5. Programming Practice: Linked Chains 1
- 4.2.6. Interactive: Demo in Visualizer
- 4.2.7. Checkpoint 2
- 4.2.8. Programming Practice: Linked Chains 2
- 4.2.9. Contains() method Animation
- 4.2.10. Checkpoint 3
- 4.2.11. Pointers Concepts Summary
- 4.3. Linked Bags
- 4.3.1. Objectives
- 4.3.2. Interactive: Introduction to Linked Bags
- 4.3.3. Interactive: LinkedBag add() and toArray()
- 4.3.4. Checkpoint 1
- 4.3.5. Interactive: ExLinkedBagJUnit Demonstration
- 4.3.6. Interactive: LinkedBag getFrequencyOf() and contains()
- 4.3.7. Checkpoint 2
- 4.3.8. Interactive: LinkedBag Removing an item
- 4.3.9. Checkpoint 3
- 4.3.10. Wrapping up Bags
- 4.3.11. Programming Practice: LinkedBags
- 4.4. Lab 4 Grocery Bags
- 4.5. Project 2
- 4.6. Lab 4 Grocery Bags Post Lab
- 4.7. Knowledge Practice 4
Week 5 Efficiency, Stacks¶
- 5.1. Efficiency
- 5.2. Stacks
- 5.2.1. Objectives
- 5.2.2. Interactive: Introduction to Stacks
- 5.2.3. Checkpoint 1
- 5.2.4. Interactive: Stack Memory Example
- 5.2.5. Checkpoint 2
- 5.2.6. Stacks Array-Based Design
- 5.2.7. Checkpoint 3
- 5.2.8. Stacks Array Implementation
- 5.2.9. Stacks Linked Chain Implementation
- 5.2.10. Checkpoint 4
- 5.2.11. Programming Practice: LinkedStacks
- 5.3. Lab 5 Ice Creme Cone
- 5.4. Lab 5 Ice Creme Cone Post Lab
- 5.5. Knowledge Practice 5
- 5.6. Programming Practice 5
Week 6 Ethics and Design¶
- 6.1. Ethics
- 6.2. Software Design and MVC
- 6.2.1. Objectives
- 6.2.2. Interactive: Introduction to Software Design
- 6.2.3. Functional and non-functional requirements
- 6.2.4. Checkpoint 1
- 6.2.5. Identifying classes, fields, and methods
- 6.2.6. Design Activity: Case Study e-Commerce solution (online storefront) for ABC Ltd
- 6.2.7. Identifying relationships, hierarchies, and opportunities for reuse
- 6.2.8. Design Activity: Determine Relationships between Classes
- 6.2.9. Checkpoint 2
- 6.2.10. Intro to Design Patterns and MVC
- 6.2.11. Interactive: MVC and Observer Video
- 6.2.12. MVC Example AddressBook
- 6.2.13. Design Review: Case Study - e-Commerce solution (online storefront) for ABC Ltd.
- 6.2.14. Design Review: Case Study - Vending Machine
- 6.3. Lab 6 Array Stack
- 6.4. Lab 6 Array Stack Post Lab
- 6.5. Ethics Assignment
- 6.6. Design Assignment
- 6.7. Knowledge Practice 6
- 6.8. Programming Practice 6
Week 7 Recursion¶
- 7.1. Project 3
- 7.2. Assessment 2 Info
- 7.3. Recursion
- 7.3.1. Objectives
- 7.3.2. Introduction to Recursion
- 7.3.3. Checkpoint 1
- 7.3.4. Interactive: More Recursion : Factorial Examples
- 7.3.5. Programming Practice: Recursion 1
- 7.3.6. Interactive: Recursion on Arrays: Display an Array
- 7.3.7. Checkpoint 2
- 7.3.8. Interactive: Recursion on Arrays: Display the Middle of an Array
- 7.3.9. Checkpoint 3
- 7.3.10. Programming Practice: Recursion 2
- 7.3.11. Interactive: Recursion on Linked Chains
- 7.3.12. Interactive: Tower of Hanoi
- 7.3.13. Checkpoint 4
- 7.3.14. Interactive: Recursion Wrap Up
- 7.3.15. Programming Practice: Recursion 3
- 7.3.16. Forward Flow Tracing Exercises
- 7.3.17. Backward Flow Tracing Exercises
- 7.3.18. Find Error Tracing Exercises
- 7.3.19. Two Recursive Calls Tracing Exercises
- 7.3.20. How Many Times Tracing Exercises
- 7.3.21. Harder Tracing Exercises
- 7.4. Midterm Checkpoint
- 7.5. Knowledge Practice 7
- 7.6. Assessment 2 Info
Week 8 Queues¶
- 8.1. Queues
- 8.1.1. Objectives
- 8.1.2. Interactive: Introduction to Queues
- 8.1.3. Checkpoint 1
- 8.1.4. Programming Practice: Queues 1
- 8.1.5. Interactive: Linked Queues Intro and Enqueue
- 8.1.6. Checkpoint 2
- 8.1.7. Interactive: Linked Queues Removing and More (Dequeue and Other Methods)
- 8.1.8. Checkpoint 3
- 8.1.9. Interactive: Introduction to Deque
- 8.1.10. Checkpoint 4
- 8.1.11. Interactive: Deque Removing and Wrap Up
- 8.1.12. Checkpoint 5
- 8.1.13. Interactive: ArrayQueue: Array Implementation of Queues
- 8.1.14. Checkpoint 6
- 8.1.15. Interactive: ArrayQueue: One Unused Location
- 8.1.16. Checkpoint 7
- 8.1.17. Interactive: ArrayQueue: Ensure Capacity
- 8.1.18. Checkpoint 8
- 8.1.19. Interactive: ArrayQueue WrapUp
- 8.1.20. Programming Practice: Queues 2
- 8.2. Lab 8 Carrano
- 8.3. Lab 8 Carrano Post Lab
- 8.4. Knowledge Practice 8
- 8.5. Programming Practice 8
Week 9 Lists and Generics¶
- 9.1. Lists
- 9.1.1. Overview & Objectives
- 9.1.2. Introduction to Lists
- 9.1.3. Checkpoint 1
- 9.1.4. Interactive: LinkedList Add() Implementation
- 9.1.5. Checkpoint 2
- 9.1.6. Interactive: Tracing Add() with Debugger
- 9.1.7. Interactive: LinkedList Remove()
- 9.1.8. Checkpoint 3
- 9.1.9. Programming Practice: Lists 1
- 9.1.10. Interactive: LinkedList Details and Options
- 9.1.11. Checkpoint 4
- 9.1.12. Interactive: An Array Implementation of a List
- 9.1.13. Programming Practice: Lists 2
- 9.2. More on Generics
- 9.3. Lab 9 Single Link
- 9.4. Project 4
- 9.5. Project 4 Ethics Discussion
- 9.6. Knowledge Practice 9
- 9.7. Programming Practice 9
Week 10 Comparing, Sorting and Iterators¶
- 10.1. Assessment 3 Info
- 10.2. Comparing and Sorting
- 10.2.1. Objectives
- 10.2.2. Introduction to Ordering, Comparing, and Sorting
- 10.2.3. Checkpoint 1
- 10.2.4. Interactive: Introduction to Sorting
- 10.2.5. Checkpoint 2
- 10.2.6. Interactive: Selection Sort
- 10.2.7. Checkpoint 3
- 10.2.8. Insertion Sort with an Array
- 10.2.9. Checkpoint 4
- 10.2.10. Insertion Sort with a Linked Chain
- 10.2.11. Checkpoint 5
- 10.2.12. Programming Practice: Insertion Sort
- 10.2.13. Introduction to Comparators
- 10.2.14. Programming Practice: Comparators
- 10.3. Iterators
- 10.3.1. Objectives
- 10.3.2. Introduction to Iterators
- 10.3.3. Checkpoint 1
- 10.3.4. Programming Using the Iterable Interface
- 10.3.5. Checkpoint 2
- 10.3.6. Programming Using Iterators
- 10.3.7. Checkpoint 3
- 10.3.8. Iterator Design Decisions
- 10.3.9. Inner Iterator for ex11.3-Iterator
- 10.3.10. Programming Practice: Iterators
- 10.3.11. Scanners Implement Iterator<String>
- 10.4. Lab 10 Double Link
- 10.5. Assessment 3 Info
- 10.6. Knowledge Practice 10
Week 11 Sorted Lists¶
- 11.1. Project 4 Milestone
- 11.2. Sorted Lists
- 11.2.1. Shortcuts
- 11.2.2. Objectives
- 11.2.3. Interactive: Introduction to Sorted Lists
- 11.2.4. Recap UML/code for ListInterface
- 11.2.5. List ADT
- 11.2.6. Checkpoint 1
- 11.2.7. Implementing a Sorted List ADT
- 11.2.8. Implementing a Sorted List ADT with and Underlying Array
- 11.2.9. Implementing a Sorted List ADT with an Underlying Linked Chain
- 11.2.10. Writing from Scratch Approach - Efficiency of the Array-Based and Link-Based implementations
- 11.2.11. Checkpoint 2
- 11.2.12. Implementing Using Composition
- 11.2.13. Implementation from Scratch
- 11.2.14. Implementing Using Inheritance
- 11.3. Project 5
- 11.4. Project 5 Group Forming
- 11.5. Knowledge Practice 11
Week 12 Project¶
Week 13 Cloning and Trees¶
Week 14 Binary Search¶
- 14.1. Assessment 4 Info
- 14.2. Project 5 Group Feedback
- 14.3. Binary Search
- 14.4. Binary Search Trees
- 14.4.1. Objectives
- 14.4.2. Interactive: Introduction to Binary Search Trees
- 14.4.3. Checkpoint 1
- 14.4.4. Interactive: Programming Binary Search Trees
- 14.4.5. Checkpoint 2
- 14.4.6. Interactive: Adding Binary Search Trees
- 14.4.7. Checkpoint 3
- 14.4.8. Interactive: Removing From Binary Search Trees
- 14.4.9. Checkpoint 4
- 14.5. Lab 14 BST
- 14.6. Knowledge Practice 14
Week 16 Reference¶
- 16.1. Importing and Using Downloaded Examples in Eclipse
- 16.2. Writing JUnit Tests with student.TestCase
- 16.2.1. Use JUnit
- 16.2.2. Run a JUnit Test
- 16.2.3. Naming Conventions
- 16.2.4. Instance Variables
- 16.2.5. setUp Method
- 16.2.6. tearDown Method (Optional)
- 16.2.7. Code coverage
- 16.2.8. Testing Exceptions
- 16.2.9. General Unit Testing Tips
- 16.2.10. Testing methods by passing null params
- 16.2.11. I/O Testing Tips
- 16.3. Java I/O tutorial
- 16.3.1. Files and Stream-based Input and Output
- 16.3.2. Basic Input and Output Concepts
- 16.3.3. Opening a Stream for Output
- 16.3.4. Writing to an Output Stream
- 16.3.5. Closing a Stream
- 16.3.6. A Complete Output Example
- 16.3.7. Output with System.out
- 16.3.8. Opening a Stream for Input
- 16.3.9. Reading from an Input Stream
- 16.3.10. A Complete Input Example
- 16.3.11. A Complete Input/Output Example
- 16.3.12. Testing I/O-based Operations
- 16.3.13. Dealing with Exceptions
- 16.4. Commenting guidelines
- 16.5. Tips on Random Numbers