Skip to content

Repository files navigation

cs-foundations

I kept noticing the same ideas repeat across every language I learned — a stack is a stack whether it's Python, Java, or C++. This repo is that observation, made concrete.

It collects the foundation work I did across Python, Java, and C++ into one place, organised by concept rather than by course or language, so the pattern shows instead of the syllabus.

What's Inside

Data Structures — Java

  • Linked listdata-structures/linked-list/
  • Stack (array-based) — data-structures/stack/
  • Queue (array-based) — data-structures/queue/
  • Recursiondata-structures/recursion/

These are clean implementations with edge-case handling (empty structures, full arrays) and a demo runner in src/examples/.

Object-Oriented Programming — Java

  • Classes & objectsoop-principles/classes-objects/
  • Encapsulationoop-principles/encapsulation/
  • Inheritanceoop-principles/inheritance/
  • Polymorphismoop-principles/polymorphism/
  • Abstractionoop-principles/abstraction/
  • Interfacesoop-principles/interfaces/

Each principle has a small worked example plus a test file showing it in use.

Structured Programming — C++

  • Input/outputstructured-programming/input-output/
  • Conditionalsstructured-programming/conditionals/
  • Loopsstructured-programming/loops/
  • Functionsstructured-programming/functions/
  • Arraysstructured-programming/arrays/
  • Structsstructured-programming/structs/
  • Mini project (library menu system) — structured-programming/mini-projects/

This was my procedural programming foundation before moving into OOP and DSA.

Python Basics — Python

  • Variables & inputpython-basics/variables-input/
  • Conditionalspython-basics/conditionals/
  • Loopspython-basics/loops/
  • Functionspython-basics/functions/
  • Listspython-basics/lists/
  • Filespython-basics/files/
  • Mini project (simple banking menu) — python-basics/mini-projects/

Academic Assignments — Java

The academic-assignments/ folder holds selected past CMPG221 exercises, summarised in my own words. These are cleaned summaries, not a raw coursework dump — no student numbers, private screenshots, or original instruction PDFs.

  • Assignment 1: OOP inheritance and polymorphism
  • Assignment 2: OOP arrays, sorting, and complexity
  • Assignment 3: Text-based Snake with MyArrayList
  • Assignment 4: Music festival booking with MyLinkedList
  • Assignment 5: Hospital emergency room with linked-list stack and queue
  • Assignment 6: Recursion, stack tracing, and string permutations
  • Assignment 7: Hybrid sorting algorithm

Notes

  • notes/time-complexity.md — Big O, best/average/worst cases, complexity of the core structures
  • notes/oop-principles.md — the four pillars with concrete Java examples
  • notes/structured-programming.md and notes/problem-solving-in-cpp.md — C++ fundamentals
  • notes/programming-basics.md and notes/problem-solving.md — Python fundamentals

Why Consolidate

These examples originally lived in separate repos, one per language. Putting them together makes the point explicit: the concepts transfer, the syntax doesn't. A reviewer can see the same stack implemented in Java and the same procedural patterns in C++ and Python side by side.

How To Run

The examples are per-folder and self-contained.

Java:

javac -d out data-structures/linked-list/SinglyLinkedList.java data-structures/stack/StackUsingArray.java data-structures/queue/QueueUsingArray.java data-structures/recursion/RecursionExamples.java src/examples/Main.java
java -cp out Main

C++:

g++ structured-programming/mini-projects/library_menu_system.cpp -o library_menu
./library_menu

Python:

python python-basics/mini-projects/simple_banking_menu.py

Each folder has its own README with the specific compile/run command and what the example demonstrates.

Portfolio Note

These examples originally lived in four separate single-language repositories. This repo is their consolidated, concept-organised successor — the point is that the concepts transfer across languages, not that each language needs its own repo.

About

CS foundations across Java, C++, and Python — data structures, OOP, structured programming, organized by concept

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages