Week 3: Flow Chart And Test Case

Submitted By thealchemist405
Words: 616
Pages: 3

Michael Byrd
Class: CMIS102
Section: 7987
Professor: James Huskin
Due Date: Nov 9, 2014

Week 3: Flow Chart and Test Case

Program Description:
This program will provide the user with the ability to build their own custom computer by selecting the specific features and/or parts they would like to have installed and then provide them with a final price value based on which features/parts they have chosen.

Analysis:
First I will search the internet to find the most accurate pricings available for a given feature/part. Then I will define a minimum of three variables of the most salient/important objects to consider when building a personal computer. My inputs will first define each part/feature to be included and to assign a value (in dollars) to each. After all custom parts/features have been chosen by the user the program will then add the sum of each to give a total price for the custom PC.

Test Plan:
Test Case#
Input
Expected Output
1
Baseline Cost: $500

CPU Option 1 (Intel i5 3.3GHz, 4/4 threads $241.00)

Monitor Option 1 (Dell, $200)

RAM Option 1 (4GB, $89)

Graphics Card 1: (GeForce GTX 750 $120.00 )

(Total Price would be $500 + cost of CPU + cost of monitor + Cost of RAM + cost of graphics card)
Total Price = $1150.00
2
Baseline Cost: $500

CPU Option 2 (Intel i7 3.5GHz 4/8 threads $349.00)

Monitor Option 2: (LG 27” LED/HD $309.00)

RAM Option: (8GB $150)

Graphics Card 2: (GeForce GTX 780Ti $480.00 )

(Total Price would be $500 + cost of CPU + cost of monitor + Cost of RAM + Graphics Card)
Total Price = $1788.00
3
Baseline Cost: $500

CPU Option 3 (Intel i7 3.6GHz 6/12 threads $1,000.00)

Monitor Option 3: (Samsung 24” LED HD $622.00)

Ram Option 3: (16GB $350)

Graphics Card 3: (Geforce GTX Titan Z $1500.00)

(Total Price would be $500 + cost of CPU + cost of monitor + Cost of RAM + graphics card)
Total Price = 3972.00

/* * GamingComputer.cpp * * Created on: Nov 6, 2014 * Author: Michael */

#include<iostream>
#include<iomanip>
#include<string>

using namespace std;

int main()
{
//declare variables char cpu, monitor, RAM, graphicsCard; float price_cpu, price_RAM, price_monitor, price_graphicsCard; float totalPrice;

//initialize variables price_cpu = 0; price_RAM = 0; price_monitor = 0; price_graphicsCard = 0; ///cpu = 'a,b,c'; //RAM = 'd,e,f'; //monitor = 'g,h,i'; //graphicscard = 'j,k,l';

//get user input cout << "Choose processor:\n" << "(a)Intel i7 3.6GHz 6/12 threads $1,000.00\n, (b)Intel i7 3.5GHz 4/8 threads $349.00\n , (c)Intel i5 3.3GHz, 4/4 threads $241.00"; cin >> cpu;

//Input choice of CPU - a for intel i7 , b for i7 or c for i5)

if (cpu == 'a') price_cpu=1000.00; else if (cpu == 'b') price_cpu=349.00; else if (cpu == 'c') price_cpu=241.00; cout << "Total:"<< price_cpu << endl; //input choice of monitor - d for dell, e for LG, f for samsung) cout << "Choose Monitor:\n" <<