A premium, interactive, bilingual (C++ & Java) learning workspace covering 14 progressive modules of Object-Oriented Programming β from structs and encapsulation all the way to multithreading, networking, and code testing.
- What is OOPverse?
- Project Structure
- Prerequisites
- Getting Started
- 14-Module Curriculum
- Known Limitations
- Tech Stack
- CI/CD Pipeline
- Reference Material
- Creator
OOPverse is a structured, self-contained OOP learning repository designed for students and developers who want to master Object-Oriented Programming through hands-on, runnable examples. Every concept is demonstrated side-by-side in both C++ and Java, making it easy to understand how the same paradigm is expressed across two of the most widely used languages in the world.
Key highlights:
- β 14 progressive modules β carefully ordered from basics to advanced topics, plus a dedicated code-testing module
- β Bilingual β every module has both C++ and Java implementations
- β Two runners β a modern Web UI (with two execution modes) and a terminal-based CLI runner
- β
Real interactive input support β the Web UI can run programs that read from
cin/Scannerlive, not just batch-style - β Zero manual compilation β the runners handle compile, execute, and cleanup automatically
- β CI/CD verified β every file in the repo is guaranteed to compile on every commit
- β Per-module READMEs β each module has its own detailed explanation
OOPverse/
βββ 01_Basics_and_Structs/
β βββ cpp/ # C++ source files
β βββ java/ # Java source files
β βββ README.md # Module-level explanation
βββ 02_Classes_and_Encapsulation/
βββ 03_Inheritance/
βββ 04_Polymorphism_and_Overloading/
βββ 05_Templates_and_Generics/
βββ 06_STL_and_Collections/
βββ 07_IO_and_Manipulators/
βββ 08_Exception_Handling/
βββ 09_File_Operations/
βββ 10_Nested_Classes_and_Enums/
βββ 11_Multithreading/
βββ 12_Networking/
βββ 13_Command_Line_Arguments/
βββ 14_Code_Testing/
β
βββ index.html # Web UI frontend (markup only)
βββ css/
β βββ styles.css # Web UI styling β CSS-variable driven theme (light/dark)
βββ js/
β βββ app.js # Web UI client logic (module/file browsing, both run modes)
βββ play-server.js # Web UI backend (Node.js + Express + WebSocket)
βββ play.sh # CLI runner for Linux / macOS
βββ play.ps1 # CLI runner for Windows (PowerShell)
βββ package.json # Node.js dependencies
βββ Materials/
βββ OOP QB BUET_TF.pdf # BUET OOP question bank (reference)
Each numbered module folder follows the same layout: a cpp/ subfolder, a java/ subfolder, and a README.md explaining the concepts covered. Any file you drop directly into a module's cpp/ or java/ folder is picked up automatically by both runners β no registration or config needed.
Before running OOPverse, make sure the following are installed on your system:
| Tool | Version | Purpose |
|---|---|---|
| G++ (GCC) | C++17 or later | Compile C++ files |
| JDK (OpenJDK) | 17 or later | Compile & run Java files |
| Node.js | 16 or later | Required for the Web UI runner only |
Verify your installations:
g++ --version
java --version
javac --version
node --version # Only needed for Web UIWindows only, for Interactive Terminal mode: the Web UI's live/interactive run mode depends on
node-pty, which compiles a native addon on install. This requires a C++ build toolchain β either Visual Studio Build Tools (with the "Desktop development with C++" workload) ornpm install --global windows-build-tools, plus Python 3 fornode-gyp. Judge-style mode has no such requirement.
OOPverse provides two ways to browse and run examples. Choose whichever suits your workflow.
The Web UI is a browser-based interface powered by a Node.js + Express backend. It lets you browse modules, preview source code, and compile & run files β all with a single click.
Step 1 β Install dependencies (first time only)
npm installStep 2 β Start the server
npm startStep 3 β Open your browser
http://localhost:3000
| Feature | Description |
|---|---|
| π Module browser | Lists all 14 modules in the sidebar |
| π Language toggle | Switch between C++ and Java file lists instantly |
| π Code preview | View the full source code of any file before running it |
| π Dark mode | Full light/dark theme, driven entirely by CSS variables |
| Compiles and executes the selected file on the server | |
| π Live output | Displays compiler output and program output in a terminal-style panel |
| π§Ή Auto cleanup | Compiled binaries (.exe, .class) are deleted automatically after each run |
| β±οΈ Timeout guard | Judge-style runs are terminated after 15s; interactive sessions after 60s |
The Run panel lets you choose per run how input is supplied:
| Mode | How it works | Best for |
|---|---|---|
| Judge style | Paste all expected input upfront into a textarea, one value per line. The program runs start-to-finish and returns a single result β just like an online judge (Codeforces, etc.) feeding input from a file. | Competitive-programming style problems where you already know the input, or any file with no cin/Scanner calls |
| Interactive terminal | Compiles the file, then runs it inside a real pseudo-terminal (PTY) over a WebSocket connection. Output streams in live as it's printed, and you type responses into a live input box exactly as you would in a real console. | Programs that print prompts and read cin >> / Scanner.nextInt() etc., especially ones using cin.tie(nullptr); ios::sync_with_stdio(false);, where judge-style buffering would hide prompts until the very end |
Why two modes exist: piped (non-interactive) processes default to fully-buffered
stdout, so prompts and output can appear all at once at the end rather than as the program runs β especially once fast-I/O optimizations are used. A real PTY restores normal line-buffered behavior, so Interactive mode shows prompts exactly when they're printed.
Note on Interactive mode: it streams a raw text feed. It doesn't fully emulate a terminal (no live re-rendering of
system("cls"), colored text, or cursor-controlled progress bars) β the escape codes for those are stripped for readability. For everything from ordinarycin/Scannerbased programs, this makes no difference.
Port conflict? If port 3000 is already in use, open
play-server.jsand changeconst PORT = 3000;to any available port number.
The CLI runner is a fully interactive terminal menu β no browser or Node.js required. It works on any platform that has a shell, and standard input works exactly as in a normal terminal since there's no buffering to worry about.
On Linux / macOS:
chmod +x play.sh
./play.shOn Windows (PowerShell):
.\play.ps1- Select a module β an interactive numbered menu lists all 14 modules
- Select a language β choose C++ or Java
- Select a file β pick from the available source files in that module
- Run β the runner compiles the file, prints the output, and cleans up the binary automatically
The modules are designed in strict progressive order. Each module builds on the previous one and presents concepts in both C++ and Java for direct comparison.
| # | Module | Core Concepts | C++ Highlights | Java Highlights |
|---|---|---|---|---|
| 01 | Basics & Structs | Primitive types, scopes, basic I/O, type casting, arrays | Struct layouts, pointers, namespaces | BasicIO, loops, ArrayDemo, MethodDemo, multidimensional arrays |
| 02 | Classes & Encapsulation | Classes, encapsulation, object lifetimes, constructors, destructors | Rule of Three/Five, move semantics, smart pointers, this pointer, shallow vs deep copy |
ClassBasics, static blocks, AccessModifiers, CopyConstructor |
| 03 | Inheritance | Single, multilevel, hierarchical, multiple, and hybrid inheritance | Virtual destructors, constructor chaining, all four type casts (static_cast, dynamic_cast, const_cast, reinterpret_cast) |
SingleInheritance, Interfaces (default, static, private methods), AbstractClass, super keyword |
| 04 | Polymorphism & Overloading | Function/method overloading, method overriding, virtual dispatch, abstraction | Operator overloading (unary & binary), conversion functions, vtables | MethodOverloading, runtime polymorphism, upcasting, autoboxing |
| 05 | Templates & Generics | Compile-time generic programming | Class templates, function templates, template inheritance, monomorphization | Generic classes, generic methods, generic interfaces, wildcards (extends/super), multi-type generics |
| 06 | STL & Collections | Containers, iterators, standard algorithms | vector, list, deque, map, set, unordered containers, lambda sorting, STL algorithms |
ArrayList, LinkedList, HashMap, HashSet, Vector, iterators, custom comparators, Streams API |
| 07 | I/O & Manipulators | Standard streams, text formatting, string operations | Stream format flags, manipulators, width/precision/fill, inline functions | FormattedOutput, ScannerIO, StringBuilder, string operations, type conversion |
| 08 | Exception Handling | Error propagation, exception hierarchies, safe program teardown | try/catch/throw, custom exceptions, noexcept, polymorphic exceptions |
TryCatchDemo, checked vs unchecked exceptions, try-with-resources, custom exception classes |
| 09 | File Operations | Read/write text and binary files, serialization | Sequential & random access (seekg/seekp), stream buffers |
FileReadDemo, FileWriteDemo, BufferedReader, serialization & deserialization, random access files |
| 10 | Nested Classes & Enums | Scoped structures, inner type encapsulation | Nested structs, scoped enum class |
Static/non-static inner classes, anonymous classes, enums with constructors and fields |
| 11 | Multithreading | Parallel execution, thread synchronization, inter-thread communication | std::thread, mutex, lock_guard, condition_variable, lambda threads |
Thread class, Runnable, synchronized, wait()/notify(), join(), producer-consumer pattern |
| 12 | Networking | Socket programming, client-server architecture, network I/O | POSIX sockets (Linux/macOS), Winsock2 (Windows), TCP server setup | ServerSocket, Socket, client-server message exchange, input/output streams over network |
| 13 | Command-Line Arguments | Runtime input via CLI flags and arguments | argc/argv parsing, CLI config structures |
String[] args parsing, argument validation, input handling |
| 14 | Code Testing | Applying OOP + DS/A fundamentals to solved problems | Checking & Testing code | Checking & Testing code |
| v1 | v2 | |
|---|---|---|
User input (cin, Scanner) |
β Not supported β any program waiting on input would hang for 15s and time out | β Supported via two modes: paste input upfront (Judge style) or type live while the program runs (Interactive terminal, real PTY) |
| Frontend code | Inline <style> and <script> inside one index.html |
Split into index.html, css/styles.css, js/app.js |
| Dark mode | Every component had a duplicated body.dark-mode .x { } rule |
Single set of CSS variables in :root; dark mode just overrides the variables |
| Modules | 13 | 14 (added 14_Code_Testing) |
| Backend | Express only (/api/run, one-shot exec()) |
Express + WebSocket (ws) + node-pty for live sessions |
- Interactive Terminal mode is Windows-only as currently implemented. Both
/api/run(judge mode) and the interactive PTY path shell out viacmd.exe. On Linux/macOS, judge-style CLI usage still works fine throughplay.sh, but the Web UI's compile/run commands need to be ported to a POSIX shell to work cross-platform. - Interactive mode streams raw text, not a full terminal emulation. ANSI/VT escape sequences (cursor positioning,
clear, colors) are stripped for readability rather than rendered β fine for standardcin/Scannerprograms, not suitable for anything relying on live-redrawn output (e.g. a console progress bar). node_modules/is currently committed to the repository. This is typically unintentional β recommend adding a.gitignoreand runninggit rm -r --cached node_modulesto slim down the repo.
Every commit pushed to main or master automatically triggers a GitHub Actions workflow that compiles every single source file in the repository.
What gets checked:
- All
.cppfiles are compiled withg++ -std=c++17 -fsyntax-only - All
.javafiles are compiled withjavac(JDK 17) - Compiled
.classfiles are cleaned up after each check - The workflow fails immediately if any file does not compile
This ensures OOPverse is always in a 100% build-safe state and can be trusted as a reliable reference.
Workflow file: .github/workflows/compile_check.yml
The code examples, concepts, and learning structure throughout OOPverse are largely inspired by and in many cases directly derived from the lecture materials, slides, and teachings of the faculty members of the Department of Computer Science & Engineering, Bangladesh University of Engineering and Technology (BUET). Their structured and rigorous approach to teaching Object-Oriented Programming formed the academic foundation upon which this entire repository is built.
Sincere gratitude to all the instructors whose guidance β both inside and outside the classroom β made this work possible.
The repository includes Materials/OOP QB BUET_TF.pdf β a curated OOP question bank made by BUET CSE'24 students. It is useful for exam preparation and self-assessment alongside the code examples.
| Name | Badhon Pain |
| Institution | Bangladesh University of Engineering and Technology (BUET) |
| Department | Computer Science & Engineering |
| GitHub | @badhonpain |
| Badhon Pain |
OOPverse was designed and developed as a structured reference workspace with a focus on pedagogical clarity, bilingual coverage, and production-quality tooling. Every module, example, and runner in this repository reflects a commitment to making OOP concepts accessible, comparable, and immediately runnable.