Course outline
CSE 202 Object Oriented Programming Lab — what the course covers and how it is organised, with every lab linked to its slide deck.
General information
| Course | CSE 202 · Object Oriented Programming Lab · laboratory course |
| Language | Java (JDK with NetBeans or another IDE) |
| Companion theory | CSE 201 Object Oriented Programming |
| Materials | The department’s Object Oriented Programming Lab Manual, ten lab manuals, each rebuilt here as an interactive deck |
How each lab works
Each lab manual follows the same plan: objectives and prerequisites, the theoretical background, the implementation design, the complete source code with its expected output, a discussion of the results, in-lab tasks, and lab exercises submitted as a report.
Lab plan
| Lab | Topic | Slides |
|---|---|---|
| I | Java Syntax, Data Types & Control Flow Set up the JDK and an IDE, then write a first Java program that uses variables, primitive types, type casting, if/switch decisions and the three loops. | Open |
| II | Classes, Objects, Instances & Methods Model a real thing as a class with private fields, a constructor and methods; create objects, use getters and setters, a static counter, and see two variables share one object. | Open |
| III | Constructors, Overloading & Reference Passing Give a Rectangle class default, parameterised and copy constructors chained with this(…), overload area() and describe(), and find out exactly what Java passes to a method. | Open |
| IV | Inheritance, Polymorphism & Overriding Build a Vehicle hierarchy with Car, Motorcycle and ElectricCar: reuse code with extends and super, override display(), and let one loop drive every kind of vehicle. | Open |
| V | Abstract Classes & Interfaces Use an abstract Animal class for shared state and required behaviour, and the Drawable and Eatable interfaces for optional capabilities, then treat objects through both kinds of reference. | Open |
| VI | Exception Handling & Custom Exceptions Make a bank account that refuses bad input: throw and declare exceptions, catch them with try-catch-finally, write checked and unchecked custom exceptions and wrap low-level failures in a meaningful one. | Open |
| VII | Thread Creation & Thread States Create threads by extending Thread and by implementing Runnable, watch them move through NEW, RUNNABLE, TIMED_WAITING and TERMINATED, and protect a shared counter with synchronized methods. | Open |
| VIII | Synchronization, Deadlock & Resource Allocation Protect bank balances with synchronized methods and blocks, watch two transfers deadlock when they lock accounts in opposite order, and prevent it with lock ordering. | Open |
| IX | GUI Components, Drawing, AWT & Swing Build a Swing drawing application: a JFrame with layout managers, buttons and a colour box, event listeners, and a custom JPanel that draws rectangles and circles with Graphics. | Open |
| X | Animation with Threads Animate bouncing balls: a worker thread updates positions about 60 times a second, a custom panel draws each frame with double buffering, and Start, Pause and Reset buttons control it. | Open |
Lab exercises at the end of every manual are submitted as a lab report.