Object Oriented Programming
Thirteen topics that follow the CSE 201 course outline, from Java basics to JavaFX, databases and Spring. Each one is a slide deck with code you can step through line by line, memory diagrams, interactive demos, worked examples, practice and a quiz.
Inside a topic: ← → or Space to move, F for full screen, M for the slide list. Code tracers: Next ▶ runs one line and shows the stack, heap and console.
- 1Lecture 1Introducing OOP & Java BasicsWhat object-oriented programming is, how it differs from structured programming, and the Java building blocks: data types, variables, operators and decisions.33 slides · Two ways to organise a program · Classes, objects and the four pillars · The Java platform: JDK, JRE and JVM
- 2Lecture 2Iterative StatementsRepeating work with while, do-while, for and for-each loops, nesting loops, and controlling them with break, labeled break and continue.25 slides · while and do-while · The for loop · Trace: summing 1 to n
- 3Lecture 3Arrays, Sorting & SearchingStoring many values in one array, 2-D and jagged arrays, how arrays live in memory, and the classic sorting and searching algorithms.31 slides · Declaring and creating arrays · Trace: finding the highest mark · Arrays are objects: copying a reference
- 4Lectures 4–6Classes, Objects & EncapsulationDefining classes, creating objects with new, protecting data with encapsulation, writing constructors, using this, and how Java garbage-collects unused objects.27 slides · Class and object · Creating objects: new and references · Trace: constructing objects
- 5Lectures 7–8Overloading, Objects as Parameters & RecursionMethods and constructors that share a name, how Java passes arguments (always by value — even references), returning objects, and solving problems with recursion.27 slides · Method overloading · Which overload runs? · Constructor overloading and this(...)
- 6Lectures 8–9Access Control, static, final & Nested ClassesWho may use a field or method (private, default, protected, public), members that belong to the class rather than an object (static), constants and fixed references (final), and classes inside classes.24 slides · Access modifiers · Access-modifier checker · static fields and methods
- 7Lectures 9–10InheritanceBuilding new classes from existing ones with extends, drawing the hierarchy in UML, using super for constructors and members, multilevel hierarchies and the Object class.27 slides · Inheritance: the is-a relationship · Types of inheritance · What a subclass can and cannot use
- 8Lectures 11–12Overriding, Polymorphism & Abstract ClassesReplacing inherited behaviour with method overriding, dynamic method dispatch, casting within a hierarchy, abstract classes, final classes and methods, and using library classes.23 slides · Method overriding · Overloading vs overriding · Dynamic method dispatch
- 9Lectures 13–14Packages & InterfacesOrganising classes into packages, how access modifiers work across packages, defining and implementing interfaces, default and static interface methods, and choosing between interfaces and abstract classes.26 slides · Packages · Access protection across packages · Access-modifier checker
- 10Lectures 15–18Exception HandlingWhat happens when something goes wrong at run time, the exception class hierarchy, try, catch, finally, throw and throws, and writing your own exception classes.29 slides · What is an exception? · Types of exceptions · try, catch and finally
- 11Lectures 19–21Multithreaded ProgrammingRunning several tasks at once with threads: creating and starting them, the thread life cycle, race conditions and synchronization, and coordinating threads with wait and notify.33 slides · Processes and threads · The thread life cycle · Creating threads
- 12Lectures 22–23Strings & Big NumbersThe String class, the string pool and immutability, comparing and processing strings, StringBuilder, and doing arithmetic on numbers far too large for long.27 slides · The String class and the string pool · Trace: pool, heap and == · Comparing strings
- 13Lecture 24GUI, Graphics, Databases & SpringBuilding desktop interfaces with JavaFX components and layouts, handling events, drawing and animating graphics, connecting to a database with JDBC, and a first look at the Spring framework.30 slides · A JavaFX application · Components (controls) · JavaFX layout playground
The midterm follows Lecture 12 (topics 1–8). Textbooks: Herbert Schildt, Java: The Complete Reference; Paul Deitel & Harvey Deitel, Java: How to Program; Y. Daniel Liang, Introduction to Java Programming.