Data communication and network security ensures that transmitted data and network are secured from unauthorized users in a communication system. To provide security to the network and data different encryption algorithms have been used. These algorithms have been classified into symmetric and asymmetric key cryptography. This paper presents the RSA cryptosystem using object-oriented model. The RSA is one of the most popular asymmetric key schemes proposed for protection of data and network in a communication system.