This research paper presents a simulation of the Diffie-Hellman key exchange algorithm using object-oriented analysis and design techniques while addressing the limitations of existing cryptographic methods. The authors utilized Unified Modeling Language tools and implemented the algorithm in C++ to demonstrate the encapsulation of entities with properties and functions in cryptographic systems. The study concludes that object-oriented modeling can effectively represent the Diffie-Hellman algorithm, facilitating secure key exchange between communicating parties.