OBJECT-ORIENTED MODELING OF SOCIAL NETWORK GRAPHS IN JAVA: A GRAPH-BASED APPROACH - Tursunxo’jayeva Dilshodaxon; Pirnazarov Muslimbek (TADQIQOTLAR, 2026)
ABSTRACT Social networks are among the most widely used software systems in the world, connecting billions of users through relationships that can be modeled as graphs. Designing the software behind such systems requires a programming approach that is organized, flexible, and maintainable. This paper shows how the four principles of Object-Oriented Programming (OOP) — encapsulation, inheritance, polymorphism, and abstraction — can be applied in Java to build a graph-based social network model. A three-layer architecture is proposed, separating user entities, graph structure, and service logic into distinct components. The paper implements Breadth-First Search (BFS) and Depth-First Search (DFS) within an OOP framework and applies three classic design patterns from Gamma et al. (1994): Observer, Factory, and Iterator. A demonstration with five users shows how BFS discovers connections and finds shortest paths. The main finding is that OOP principles make social network graph modeling clean, modular, and easy to extend. This paper is a course demonstration of OOP design and graph algorithm competency, not a novel research contribution.