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 representative of what they would each cost individually. The total price of a state-of-the-art gaming computer is the sum of the price of each component bought individually. For the purposes of this program design, no account is made for discounts or package deals.
The necessary input for the program is a single selected hardware component for each component category chosen from three options (baseline, mid-range, bleeding edge). The output is the sum of the cost of each of the selected components.
Given variables storing the price of each selected component, the total price for a state-of-the-art gaming computer is as follow: totalPrice = selectedCPUPrice + selectedCasePrice + selectedPowerSupplyPrice + selectedMotherboardPrice + selectedHardDrivePrice + selectedRAMPrice + selectedDVDPrice + selectedSoundCardPrice + selectedMonitorPrice + selectedGraphicsCardPrice + selectedOSPrice;
Program Design
As is typical of data-driven applications, our data will be stored in a database external to the application. It will be a single table called “tblComponents” with a row for every component. It will consist of the following columns:
ID Unique identifier (auto-generated)
NAME Short description of the component
TYPE Type of