Optimal Component Selection in Component Based Software Development