Object Oriented Programming Lab
Ten lab sessions that follow the CSE 202 lab manual, from installing Java and NetBeans to threads, Swing and animation. Each one is a slide deck with a theory recap, the program explained in small code sections, its expected output, interactive demos, in-lab tasks with hints, report exercises with checklists, viva questions and a quiz.
Inside a lab: ← → or Space to move, F for full screen, M for the slide list. Requirement checklists are saved in this browser.
- 1Lab Manual IJava Syntax, Data Types & Control FlowSet 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.55 slides · 4 in-lab tasks · 2 report exercises
- 2Lab Manual IIClasses, Objects, Instances & MethodsModel 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.43 slides · 3 in-lab tasks · 2 report exercises
- 3Lab Manual IIIConstructors, Overloading & Reference PassingGive 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.47 slides · 3 in-lab tasks · 2 report exercises
- 4Lab Manual IVInheritance, Polymorphism & OverridingBuild 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.42 slides · 3 in-lab tasks · 2 report exercises
- 5Lab Manual VAbstract Classes & InterfacesUse 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.38 slides · 3 in-lab tasks · 2 report exercises
- 6Lab Manual VIException Handling & Custom ExceptionsMake 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.45 slides · 3 in-lab tasks · 2 report exercises
- 7Lab Manual VIIThread Creation & Thread StatesCreate 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.37 slides · 3 in-lab tasks · 2 report exercises
- 8Lab Manual VIIISynchronization, Deadlock & Resource AllocationProtect bank balances with synchronized methods and blocks, watch two transfers deadlock when they lock accounts in opposite order, and prevent it with lock ordering.40 slides · 3 in-lab tasks · 2 report exercises
- 9Lab Manual IXGUI Components, Drawing, AWT & SwingBuild 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.43 slides · 3 in-lab tasks · 2 report exercises
- 10Lab Manual XAnimation with ThreadsAnimate 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.42 slides · 3 in-lab tasks · 2 report exercises
Requirements: JDK 11 or later and an IDE such as NetBeans, Eclipse or IntelliJ IDEA. Lab content: Department of Computer Science and Engineering, Green University of Bangladesh.