This paper discusses the benefits of object-oriented programming to scientific computing, using our recent calculations of exciton binding energies with time-dependent density-functional theory (arXiv: 1302.6972) as a case study. We find that an object-oriented approach greatly facilitates the development, the debugging, and the future extension of the code by promoting code reusing. We show that parallelism is added easily in our code in a object-oriented fashion with ScaLAPACK, Boost::MPI and OpenMP.