This study presents two optimization models for selecting the best Commercial Off-The-Shelf (COTS) software product among alternatives for each module in the development of modular software systems. The objective function of the models is to maximize quality within a budgetary constraint. The software system consists of several programs, where a specific function of each program can call upon a series of modules. Several alternative COTS products are available for each module. A weight to the modules is given by utilizing the Analytic Hierarchy Process (AHP) based on the access frequencies of the modules. A simplified example is given to demonstrate each optimization model.