Component-based software engineering is concerned with the development of software that can satisfy the customer prerequisites through reuse or independent development. Coupling and cohesion measurements are primarily used to analyse the better software design quality, increase the reliability and reduced system software complexity. The complexity measurement of cohesion and coupling component to analyze the relationship between the component module. In this paper, proposed the component selection framework of Hexa-oval optimization algorithm for selecting the suitable components from the repository. It measures the interface density modules of coupling and cohesion in a modular software system. This cohesion measurement has been taken into two parameters for analyzing the result of complexity, with the help of low cohesion and high cohesion. In coupling measures between the component of inside parameters and outside parameters. The final process of coupling and cohesion, the measured values were used for the average calculation of components parameter. This paper measures the complexity of direct and indirect interaction among the component as well as the proposed algorithm selecting the optimal component for the repository. The better result is observed for high cohesion and low coupling in component-based software engineering.