Free Essay

# Cmis 102 Homework 2

Submitted By seanduna
Words 735
Pages 3
Homework Assignment #2

Analysis
Input:
The input of this program will consist of the base price (BasePrice), the operating system choice (OSChoice), the monitor choice (MonitorChoice), and the case choice (CaseChoice). After the user has made all of the required choices, the program will determine the appropriate cost of that option: OSCost, MonitorCost, and CaseCost.
Output:
The required output for the program will be the total cost (TotalCost) of the state of the art gaming computer. The program will then determine the total cost of the state of the art gaming computer by using the following computation: TotalCost = BasePrice+OSCost+MonitorCost+CaseCost.
Variables:
BasePrice // The cost of the computer prior to the user deciding on the three options
OSChoice // The operating system selected by the user
Win7 // Windows 7 Home Premium
Win8 // Windows 8.1
RedHat // Red Hat Linux 9.0 Personal
MonitorChoice // The monitor selected by the user
Asus // Asus 23.6” LED
ViewSonic // ViewSonic 20” LED
Acer // Acer 23” LCD
CaseChoice // The case selected by the user
Thermal // Thermaltake Gaming Case
Rosewill // Rosewill Black Gaming Case
NZXT // NZXT Guardian Gaming Case
OSCost // The cost of the selected operating system
MonitorCost // The cost of the selected monitor
CaseCost // The cost of the selected case
TotalCost // The total cost of the gaming system

Design
Input the base price of the computer
Calculate the base price of the computer with the total of the user selected additional costs
Display the results of the total cost of the computer gaming system

// Gaming Price Calculator
// Programmer: S. Dunaway
// Version 1.0 – April 4, 2014
// This program will calculate the total price of optional components that will be purchased for the // purposes of building a state of the art gaming system.

Hierarchy Chart for program

Main Module
Declare BasePrice, OSCost, MonitorCost, CaseCost As Float
Display a welcome message
// Prompt for and input the computer base price
Write “Thank you for using the Computer Gaming System Calculator”
Write “Please Enter the Computer Base Price”
Input BasePrice
Call Compute_OSCost module
Call Compute_MonitorCost module
Call Compute_CaseCost module
Call Display_TotalCost module
End Program

Compute_OSCost module
Declare OSChoice As String
//Display the menu and input user selection:
Write “Win7 - Windows 7 Home Premium”
Write “Win8 - Windows 8.1”
Write “RedHat - Red Hat Linux Personal 9.0”
Input OSChoice
Select Case Of OSChoice
Case “Win7”
Set OSChoice = 97.19
Break
Case “Win8”
Set OSChoice = 113.99
Break
Case “RedHat”
Set OSChoice = 347.77
Break
Default:
Write “Invalid Selection”
End Case

Compute_MonitorCost module
Declare MonitorChoice As String
//Display the menu and input user selection:
Write “Asus - Asus 23.6 inch LED”
Write “ViewSonic - ViewSonic 20 inch LED”
Write “Acer - Acer 23 inch LCD”
Input MonitorChoice
Select Case Of MonitorChoice
Case “Asus”
Set MonitorChoice = 157.00
Break
Case “ViewSonic”
Set MonitorChoice = 99.99
Break
Case “Acer”
Set MonitorChoice = 129.99
Break
Default:
Write “Invalid Selection”
End Case
Compute_CaseCost module
Declare CaseChoice As String
//Display the menu and input user selection
Write “Thermal – Thermaltake Gaming case”
Write “Rosewill – Black Gaming Case”
Write “NZXT – Guardian Gaming Case”
Input CaseChoice
Select Case Of CaseChoice
Case “Thermal”
Set MonitorChoice = 56.73
Break
Case “Rosewill”
Set CaseChoice = 49.20
Break
Case “NZXT”
Set CaseChoice = 69.99
Break
Default:
Write “Invalid Selection”
End Case
Display_TotalCost module
Declare TotalCost As Float
Set TotalCost = BasePrice + OSCost + MonitorCost + CaseCost
Write “The total cost of the gaming computer that you have selected is \$” + TotalCost

Input: Base Price of the computer gaming system, OS cost, Monitor cost, and Case cost | Expected output: Total cost of the computer gaming system | Base Price - \$2,000OS Cost – \$347.77 (Red Hat Linux)Monitor Cost – \$129.99 (Acer)Case Cost – \$56.73 (Thermaltake) | Total Cost – \$2,534.49 | Base Price - \$3,299.00OS Cost – \$97.19 (Windows 7)Monitor Cost – \$99.99 (ViewSonic)Case Cost – \$69.99 (NZXT) | Total Cost –\$3,566.17 | Base Price - \$2,499.00OS Cost – \$347.77 (Red Hat Linux)Monitor Cost – \$129.99 (Acer)Case Cost – \$69.99 (NZXT) | Total Cost – \$3,046.75 | Base Price - \$1,400OS Cost – \$113.99 (Win8)Monitor Cost – \$157.00 (Asus)Case Cost – \$49.20 (Rosewill) | Total Cost – \$1720.19 | Base Price - \$4,000OS Cost – \$347.77 (Red Hat Linux)Monitor Cost – \$129.99 (Acer)Case Cost – \$56.73 (Thermaltake) | Total Cost – \$4,534.49 |

### Similar Documents

Free Essay

#### Introduction to Problem Solving and Algorithm Design

...CMIS 102 4060 Introduction to Problem Solving and Algorithm Design HOMEWORK 2 Declare CPUCost As Float Declare CaseCost As Float Declare PowerSupplyCost As Float Declare Motherboard As Float Declare HardDriveCost As Float Declare RAMCost As Float Declare DVDCost As Float Declare SoundCardCost As Float Declare MonitorCost As Float Declare GraphicsCardCost As Float Declare OperatingSystem Cost As Float //Prompt for and input the computer price: Write “Enter the computer price:” Input ComputerPrice Call Compute_CPU_Cost module Call Compute_Case_Cost module Call Compute_Power_Supply_Cost module Call Compute_Motherboard_Cost module Call Compute_Hard_Drive_Cost module Call Compute_RAM_Cost module Call Compute_DVD_Cost module Call Compute_Monitor_Card_Cost module Call Compute_Graphics_Card_Cost module Call Compute_Operating_System_Cost module End Program Declare CPUCost as Character //Display the menu and input user selection: Write “S – Intel i7” Write “E – Intel i5” Write “D – Intel i3” Write “Selection” Input CPU Choice Select Case of CPU Choice Case “S”: Set CPUCost = 319 Break Case “E”: Set CPUCost = 229 Break Case “D”: Set CPUCost = 119 Break Default: Write” Invalid Selection” End Case Declare CaseCost as Character //Display the menu and input user selection: Write “V – Thermaltake V3” Write “C – NZXT Guardian” Write “L – Cooler Master Elite 430” Write “Selection” Input Case Choice Select Case of Case Choice Case......

Words: 311 - Pages: 2

#### Cmis 102, Hw Week 3

...Week 3 Homework for CMIS 102. * Program description: This program will calculate the total price of a laptop computer system. The program will ask the user to enter the desired CPU speed, RAM amount, Hard Drive and Monitor Size. The program use these values to calculate and then print the price of a computer system. The design step will include both pseudocode and flow chart visualization. * Analysis: I will use sequential and selection programming statements. I will define 1 float number for CPU and 4 integers for the RAM(random access memory), Hard Drive, Display and Price : CPU, RAM, HD, Monitor, Price. I will be using selection statements (If- then) to find out CPU, RAM, HD and Monitor variable option and price. For example if we have: Two HD Options: 250GB (\$50) and 500GB(\$ 100) Two RAM Options: 4GB(\$ 100) and 8GB( \$150) Two Display Options: 13 Inch Retna(\$150) and 15 inch (\$250) Two CPU options: 2.7GHz (\$900) and 2.9GHz (\$1000) The selection statement will be of this form: //Input CPU if (CPU == 2.7) then * set price = 900 * if (CPU == 2.9) then set price = 1000 We will repeat this process for every each of our variables, since we have only a few options it should not take much time. Otherwise we will have to group some of our options. The next step will be to find out the total Price of our selected laptop computer system by simple adding all variable and Print our computer Price. Price = CPU+ RAM+HD+......

Words: 712 - Pages: 3

Free Essay

#### Calculate the Usable Area in Square Feet of House. Assume That the House Has a Maximum of Four Rooms, and That Each Room Is Rectangular.

...CMIS102 Homework Assignment 1 Student Name: Neal Fowler Class/Section: CMIS 102 Section 6385 Professor Name: Marie Arvi Assignment due date: 6 January 2014 Problem definition: Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular. A. Problem Analysis: What is the required output? Total square footage of a house (in square feet) What is the necessary input? Room 1, 2, 3, and 4 length and width. How will we obtain output from input? Each room length and width input multiplied. Next all four rooms total add together for output. B. Program Design: 1. Input data: Input the variables Rm1L, Rm1W, Rm2L, Rm2W, Rm3L, Rm3W, Rm4L, Rm4W 2. Perform calculations: where… Rm1sqft = Rm1L * Rm1W, Rm2sqft = Rm2L * Rm2W, Rm3sqft = Rm3L * Rm3W, Rm4sqft = Rm4L * Rm4W, where… Housesqft = Rm1sqft + Rm2sqft + Rm3sqft + Rm4sqft 3. Output results: Display the total square feet (Housesqft) of the house // House Measurement Computation // Programmer: Neal Fowler Main module // Declare Variables Declare Rm1L Declare Rm1W Declare Rm2L Declare Rm2W Declare Rm3L Declare Rm3W Declare Rm4L Declare Rm4W Declare Rm1sqft Declare Rm2sqft Declare Rm3sqft Declare Rm4sqft Declare Housesqft Write “Home Measurement Program” Write “This program computes the total” Write “square feet (living space) of a house.” Call Input Data module Call Perform Calculations module Call Output......

Words: 472 - Pages: 2

Free Essay

#### Calculate the Usable Area in Square Feet of House. Assume That the House Has a Maximum of Four Rooms, and That Each Room Is Rectangular

...CMIS102 Homework Assignment 1 Student Name: Abel Patrick Assizo Class/Section: CMIS 102 Section 7986 Professor Name: Jose Romero Assignment due date: April 1, 2012 Assignment: Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular. 1) Problem analysis This Program is intended to compute the area of a house composed of four rectangular rooms. Indeed, for this problem, we need to output the value of the total area of the house after finding and summing the areas of each room. For this to be possible, we will define output and input variables. Therefore, for this program, we will need to output the value of the following variable: * The value of the area of the house total_area (a Float variable) We will also need to input the value of the length and width of each room, subsequently the following variables: * The value of the length of the first room length1 (a Float variable) * The value of the width of the first room width1 (a Float variable) * The value of the length of the second room length2 (a Float variable) * The value of the width of the second room width2 (a Float variable) * The value of the length of the third room length3 (a Float variable) * The value of the width of the third room width3 (a Float variable) * The value of the length of the fourth room length4 (a Float variable) * The value of the width of the fourth room...

Words: 801 - Pages: 4

Free Essay

#### Cmis 102 Hw2

...CMIS102 Homework Assignment 2 Student Name: Class/Section: CMIS 102/ 3110 Professor Name: Assignment due date: 03 February 2014 Problem definition: Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet. A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. We are writing a program to calculate the total cost of a gaming computer system. The total cost the computer system should be calculated using the following formula (TotalCost= CpuChoiceCost + RAMChoiceCost + HardDriveCost + ComponentsCost). The cost will be represented by integers. The results should be placed in variable TotalCost. The inputs, for the program are: ComponentsCost, TotalCost, A to Q, Yes or No The output for the program is TotalCost As Float. B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Main Module Declare MotherboardCost, CpuChoiceCost, SounCardCost, GraphicsCardCost, CaseCost, MonitorCost, PowerSupplyCost, DVDDriveCost, HardDriveCost, RAMChoiceCost, OperatingSystemCost AS Character Declare A to R As Integer Display a Welcome message Write “Welcome to Computer World” // Prompt for and input start building your system: Write “Would you like to start building your System?” Input Yes OR......

Words: 955 - Pages: 4

#### Career Planning

Words: 181771 - Pages: 728

Words: 181771 - Pages: 728

#### Pr Cases

...Public Relations Cases This collection of contemporary international public relations case studies is an invaluable resource for teachers, researchers and students working in public relations, corporate communications and public affairs, as well as offering practitioners an indepth understanding of the effective use of public relations in a range of organizational contexts. Including cases from the UK, Norway, Sweden, Spain, South Africa, Canada and the USA, with a focus on such global corporations as Shell, BBC America, Worldcom, PriceWaterhouseCoopers and Marks & Spencer, it offers important insights into the development of public relations and communications strategies. These include: • • • • • • • • Corporate identity change and management Global reputation management Crisis management in the oil, shipping and tourism industries Developing strategic alliances between voluntary and private sector organizations Public relations support for international branding and market entry The importance of internal communications during international mergers The integration of public relations and marketing communications Business-to-business communication The cases examined in this book demonstrate the breadth of contemporary public relations practice and the increasing importance of the public relations function in both public and private sector organizations worldwide. Danny Moss is Co-Director of the Centre for Corporate and Public Affairs at the Manchester Metropolitan......

Words: 107599 - Pages: 431