Here you can find the lesson examples used during the Programming 2 course.
- Basic usage of the map data structure: MapBasics
- Applying the map data structure: CourseGrading class and CourseGradingApp application
- Performance comparison of ArrayList and HashMap
- Unit testing basics with jUnit: Calculator class with CalculatorTest test class
- Unit testing a class: ShoppingCart class with ShoppingCartTest test class
- ⭐ Bonus: Integration testing: DiscountShoppingCart and DiscountShoppingCartApp with DiscountShoppingCartTest and DiscountShoppingCartTestWithMockito test classes
- Implementing our own interface: Shape interface example
- Using Java's ready-made interfaces: Comparable interface
- Inheritance examples
- Using interfaces to refactor code: ImperativeCalculator class vs. ObjectCalculator class
- ⭐ Bonus: Using generic methods to promote method reusability: SimpleListExample class vs. GenericsListExample class
- Imperative and declarative programming
- Lambda expressions
- Optional examples
- Stream basics
- Stream examples
- ⭐ Bonus: Records
- CountryDAO class and examples
- SQL Injection
- Simple algorithms and time complexity analysis
- Performance comparison of different algorithms for the same problem
- Bubble sort
- Wordplay exercise solution
- ⭐ Bonus: Expanded Wordplay exercise solution
- Recursion
- Simple thread example
- Runnable interface example
- Thread safety example
- Thread pool example
These materials were originally developed by Ohto Rainio and Teemu Havulinna. The original version has been translated into English and modified by Kalle Ilves. The materials are licensed under the Creative Commons BY-NC-SA license.
The implementation of the materials utilized the ChatGPT 3.5 language model.