preview

Essay about Cmis 102 Hw 2

Better Essays

CMIS 102 Homework 2 Problem Analysis In order to calculate the total price to purchase all the components required to build a state-of-the-art gaming computer, state-of-the-art must be defined. For the purposes of this program design, state-of-the-art is defined as a set of computer components that are capable of operating current games to a satisfactory level. A sample of minimum and recommended hardware requirements for modern games was taken and a baseline established for components that satisfy those requirements. Additional hardware was selected that exceeds the requirements to establish options representing mid-range and bleeding-edge components. These three sets of components were researched online to determine prices …show more content…

These tasks directly correspond to the modules of our design. An input module will display a list of 11 drop down boxes, one for each component type. Each drop-down box will contain the options available for that component type, with the baseline category option as the default. A calculation module will look up the prices for the selected components in the database and compute the sum total. A display module will output the result to the user. A main module will tie the other modules together and coordinate the calling of each module and the data passed between them. MAIN_MODULE: /* Set the defaults to baseline components */ SET selectedComponents = baselineComponents CALL INPUT_MODULE SET totalPrice = CALCULATE_MODULE CALL DISPLAY_MODULE(totalPrice) INPUT_MODULE: FOR EACH component type get list of components from the database of TYPE component type populate the combo box for component type with the list of components of that type END FOR /* Wait for the user to finish input then store the selections */ SET selectedComponents = values of the drop down boxes RETURN CALCULATE_MODULE: SET totalPrice = 0 FOR EACH component IN selectedComponents SET currentComponentPrice = look up the PRICE of the component in the database totalPrice = totalPrice + currentComponentPrice END FOR RETURN totalPrice

Get Access