Week 0 General Course Information¶
Week 1 Introduction¶
- 1.1. Welcome to CS2114
- 1.2. Getting Your Programming Environment Setup
- 1.3. Java Fundamentals
- 1.4. Java Unit Testing
- 1.5. Style and Documentation: Introduction
- 1.5.1. Shortcuts
- 1.5.2. Overview & Objectives
- 1.5.3. Suggested Reading:
- 1.5.4. Introduction to Style and Documentation
- 1.5.5. The challenge
- 1.5.6. Style Guides
- 1.5.7. Naming: What’s in a name
- 1.5.8. Naming conventions
- 1.5.9. Basics naming rules
- 1.5.10. Source Files and Directories
- 1.5.11. Packages
- 1.5.12. Class
- 1.5.13. Interface
- 1.5.14. Methods
- 1.5.15. Variables
- 1.5.16. Constants
- 1.5.17. Naming Dos and Donts
- 1.5.18. Naming Summary
- 1.5.19. Code Review
- 1.5.20. Naming Review [10:18]
- 1.5.21. Formatting
- 1.5.22. Indentation
- 1.5.23. Formatting for this course / Setting up Eclipse Formatting
- 1.5.24. Line length
- 1.5.25. Braces
- 1.5.26. Spacing after commas and other operators
- 1.5.27. Blank Lines
- 1.5.28. Line breaks and continuation indentation
- 1.5.29. Software Documentation overview
- 1.5.30. JavaDoc Comments
- 1.5.31. Describing a class
- 1.5.32. Documenting public fields/instance variables and static variables
- 1.5.33. Documenting a method
- 1.5.34. Javadoc Tags
- 1.5.35. Other comments
- 1.5.36. Other style matters
- 1.5.37. Use of constants and referenced values vs hard coding
- 1.5.38. Constants
- 1.5.39. Referenced value
- 1.5.40. Access Modifiers and Visibility of classes, fields, and methods
- 1.5.41. Testing methods by passing null params
- 1.5.42. Review Checklist
- 1.5.43. Style & Documentation Final Review [8:17]
- 1.5.44. 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. Exception Handling with try, catch, and finally [7:16]
- 2.1.6. Handling the Exception now
- 2.1.7. Handling the Exception later on (postponing or deferring handling of the Exception)
- 2.1.8. Exception Examples - Basic to Complex
- 2.1.9. Implementing and Testing Exceptions
- 2.1.10. Checkpoint 2
- 2.2. Polymorphism
- 2.2.1. Objectives
- 2.2.2. Interactive: Introduction to Object Oriented Programming [9:26]
- 2.2.3. Checkpoint 1
- 2.2.4. Interactive: Java UML Diagrams [6:15]
- 2.2.5. Programming Practice: Object Oriented Programming
- 2.2.6. Interactive: Java Inheritance: this, super [11:15]
- 2.2.7. Checkpoint 2
- 2.2.8. Interactive: Java Inheritance: equals(), toString() [14:33]
- 2.2.9. Java OOP Checkpoint 3
- 2.2.10. Interactive: Polymorphism Measurable Interface [7:23]
- 2.2.11. Checkpoint 4
- 2.2.12. Programming Practice: Polymorphism 1
- 2.2.13. Interactive: Polymorphism Computer Superclass [12:09]
- 2.2.14. Checkpoint 5
- 2.2.15. Interactive: Polymorphism Integer Example [7:40]
- 2.2.16. Checkpoint 6
- 2.2.17. 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. Assessment 1 Info
- 3.2. Bags
- 3.2.1. Objectives
- 3.2.2. Introduction to Bags
- 3.2.3. Documentation of Bag Interface methods
- 3.2.4. Interactive: Documentation of Bag Interface Methods [7:28]
- 3.2.5. Interactive: Using Bags [4:34]
- 3.2.6. Checkpoint 1
- 3.2.7. Programming Practice: ArrayBags
- 3.2.8. Array Implementation of Bags
- 3.2.9. Checkpoint 2
- 3.2.10. Demo More bag method implementation
- 3.2.11. Checkpoint 3
- 3.2.12. Methods that Remove and Design Improvement Lesson and Demo
- 3.2.13. Checkpoint 4
- 3.2.14. Interactive: Array resizing description and coding Demo [14:47]
- 3.2.15. Tradeoffs of using an array implementation for a bag
- 3.2.16. Programming Practice: The Bag Interface
- 3.3. Lab 3 Movie Database
- 3.4. Lab 3 Movie Database Post Lab
- 3.5. Project 1
- 3.6. Knowledge Practice 3
- 3.7. Programming Practice 3
Week 4 Linked Chains, Bags Continued¶
- 4.1. Linked Chains (Pointers)
- 4.1.1. Objectives
- 4.1.2. Reference Variables
- 4.1.3. Interactive: Intro to Linked Chains of Nodes [10:51]
- 4.1.4. Checkpoint 1
- 4.1.5. SWDataStructsAndDesign_LinkedChains1
- 4.1.6. Interactive: Demo in Visualizer [11:31]
- 4.1.7. Checkpoint 2
- 4.1.8. SWDataStructsAndDesign_LinkedChains2
- 4.1.9. Contains() method Animation [5:14]
- 4.1.10. Checkpoint 3
- 4.1.11. Pointers Concepts Summary
- 4.2. Linked Bags
- 4.2.1. Objectives
- 4.2.2. Interactive: Introduction to Linked Bags [4:10]
- 4.2.3. Interactive: LinkedBag add() and toArray() [12:45]
- 4.2.4. Checkpoint 1
- 4.2.5. Interactive: ExLinkedBagJUnit Demonstration [7:14]
- 4.2.6. Interactive: LinkedBag getFrequencyOf() and contains() [14:00]
- 4.2.7. Checkpoint 2
- 4.2.8. Interactive: LinkedBag Removing an item [13:44]
- 4.2.9. Checkpoint 3
- 4.2.10. Wrapping up Bags
- 4.2.11. Programming Practice: LinkedBags
- 4.3. Lab 4 Grocery Bags
- 4.4. Project 2
- 4.5. Lab 4 Grocery Bags Post Lab
- 4.6. Knowledge Practice 4
Week 5 Efficiency, Stacks¶
- 5.1. Efficiency
- 5.2. Stacks
- 5.2.1. Objectives
- 5.2.2. Interactive: Introduction to Stacks [11:32]
- 5.2.3. Checkpoint 1
- 5.2.4. Interactive: Stack Memory Example [6:25]
- 5.2.5. Checkpoint 2
- 5.2.6. Stacks Array-Based Design [4:57]
- 5.2.7. Checkpoint 3
- 5.2.8. Stacks Array Implementation [5:57]
- 5.2.9. Stacks Linked Chain Implementation [5:57]
- 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. Placeholder
- 6.2. Software Design and MVC
- 6.2.1. Objectives
- 6.2.2. Interactive: Introduction to Software Design [9:30]
- 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. Activity
- 6.2.9. Checkpoint 2
- 6.2.10. Intro to Design Patterns and MVC
- 6.2.11. Interactive: MVC and Observer Video [11:00]
- 6.2.12. MVC Example AddressBook
- 6.2.13. Design Review: Case Study - e-Commerce solution (online storefront) for ABC Ltd.
- 6.2.14. Case Study - Vending Machine
- 6.3. Lab 6 Array Stack
- 6.4. Lab 6 Array Stack Post Lab
- 6.5. Knowledge Practice 6
- 6.6. Programming Practice 6
Week 7 Recursion¶
- 7.1. Assessment 2 Info
- 7.2. Recursion
- 7.2.1. Objectives
- 7.2.2. Introduction to Recursion
- 7.2.3. Checkpoint 1
- 7.2.4. Interactive: More Recursion : Factorial Examples [12:36]
- 7.2.5. Programming Practice: Recursion 1
- 7.2.6. Interactive: Recursion on Arrays: Display an Array [13:30]
- 7.2.7. Checkpoint 2
- 7.2.8. Interactive: Recursion on Arrays: Display the Middle of an Array [9:53]
- 7.2.9. Checkpoint 3
- 7.2.10. Programming Practice: Recursion 2
- 7.2.11. Interactive: Recursion on Linked Chains [7:41]
- 7.2.12. Interactive: Tower of Hanoi [11:44]
- 7.2.13. Checkpoint 4
- 7.2.14. Interactive: Recursion Wrap Up [8:28]
- 7.2.15. Programming Practice: Recursion 3
- 7.2.16. Forward Flow Tracing Exercises
- 7.2.17. Backward Flow Tracing Exercises
- 7.2.18. Find Error Tracing Exercises
- 7.2.19. Two Recursive Calls Tracing Exercises
- 7.2.20. How Many Times Tracing Exercises
- 7.2.21. Harder Tracing Exercises
- 7.3. Project 3
- 7.4. Midterm Checkpoint
- 7.5. Knowledge Practice 7
- 7.6. Assessment 2 Info
- 7.7. Programming Practice 7
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 [11:29]
- 8.1.6. Checkpoint 2
- 8.1.7. Interactive: Linked Queues Removing and More (Dequeue and Other Methods) [8:41]
- 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 [9:02]
- 8.1.12. Checkpoint 5
- 8.1.13. Interactive: ArrayQueue: Array Implementation of Queues [15:58]
- 8.1.14. Checkpoint 6
- 8.1.15. Interactive: ArrayQueue: One Unused Location [7:11]
- 8.1.16. Checkpoint 7
- 8.1.17. Interactive: ArrayQueue: Ensure Capacity [14:06]
- 8.1.18. Checkpoint 8
- 8.1.19. Interactive: ArrayQueue WrapUp [6:59]
- 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 [13:41]
- 9.1.3. Checkpoint 1
- 9.1.4. Interactive: LinkedList Add() Implementation [10:21]
- 9.1.5. Checkpoint 2
- 9.1.6. Interactive: Tracing Add() with Debugger [13:33]
- 9.1.7. Interactive: LinkedList Remove() [18:09]
- 9.1.8. Checkpoint 3
- 9.1.9. Programming Practice: Lists 1
- 9.1.10. Interactive: LinkedList Details and Options [10:19]
- 9.1.11. Checkpoint 4
- 9.1.12. Interactive: An Array Implementation of a List [15:48]
- 9.1.13. Programming Practice: Lists 2
- 9.2. Generics 2
- 9.3. Lab 9 Single Link
- 9.4. Project 4
- 9.5. Project 4 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 [13:39]
- 10.2.3. Checkpoint 1
- 10.2.4. Interactive: Introduction to Sorting [12:51]
- 10.2.5. Checkpoint 2
- 10.2.6. Interactive: Selection Sort [12:36]
- 10.2.7. Checkpoint 3
- 10.2.8. Insertion Sort with an Array [16:17]
- 10.2.9. Checkpoint 4
- 10.2.10. Insertion Sort with a Linked Chain [16:50]
- 10.2.11. Checkpoint 5
- 10.2.12. Programming Practice: Insertion Sort
- 10.2.13. Introduction to Comparators [11:22]
- 10.2.14. Programming Practice: Comparators
- 10.3. Iterators
- 10.3.1. Objectives
- 10.3.2. Introduction to Iterators [13:14]
- 10.3.3. Checkpoint 1
- 10.3.4. Programming Using the Iterable Interface [4:36]
- 10.3.5. Checkpoint 2
- 10.3.6. Programming Using Iterators [18:02]
- 10.3.7. Checkpoint 3
- 10.3.8. Iterator Design Decisions [8:21]
- 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. Sorted Lists
- 11.1.1. Objectives
- 11.1.2. Interactive: Introduction to Sorted Lists
- 11.1.3. Recap UML/code for ListInterface
- 11.1.4. List ADT
- 11.1.5. Sorted List ADT
- 11.1.6. Checkpoint 1
- 11.1.7. Implementing a Sorted List ADT
- 11.1.8. Implementing a Sorted List ADT with and Underlying Array
- 11.1.9. Implementing a Sorted List ADT with an Underlying Linked Chain
- 11.1.10. Writing from Scratch Approach - Efficiency of the Array-Based and Link-Based implementations
- 11.1.11. Checkpoint 2
- 11.1.12. Implementing Using Composition
- 11.1.13. Implementation from Scratch
- 11.1.14. Implementing Using Inheritance
- 11.2. Project 5
- 11.3. Knowledge Practice 11
- 11.4. Programming 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
Week 16 Reference¶
- 16.1. Downloading and Setting up your lab in Eclipse
- 16.2. Importing and Using Downloaded Examples in Eclipse
- 16.3. Writing JUnit Tests with student.TestCase
- 16.3.1. Use JUnit
- 16.3.2. Run a JUnit Test
- 16.3.3. Naming Conventions
- 16.3.4. Instance Variables
- 16.3.5. setUp Method
- 16.3.6. tearDown Method (Optional)
- 16.3.7. Code coverage
- 16.3.8. Testing Exceptions
- 16.3.9. General Unit Testing Tips
- 16.3.10. Testing methods by passing null params
- 16.3.11. I/O Testing Tips
- 16.4. Java I/O tutorial
- 16.4.1. Files and Stream-based Input and Output
- 16.4.2. Basic Input and Output Concepts
- 16.4.3. Opening a Stream for Output
- 16.4.4. Writing to an Output Stream
- 16.4.5. Closing a Stream
- 16.4.6. A Complete Output Example
- 16.4.7. Output with System.out
- 16.4.8. Opening a Stream for Input
- 16.4.9. Reading from an Input Stream
- 16.4.10. A Complete Input Example
- 16.4.11. A Complete Input/Output Example
- 16.4.12. Testing I/O-based Operations
- 16.4.13. Dealing with Exceptions
- 16.5. Commenting guidelines
- 16.6. Tips on Random Numbers