Cmis 102 Homework 2

In: Computers and Technology

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 user selected options to add the additional costs
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…...

Similar Documents

Cmis 102

...Lot's of Stuff We all spend a lot of time and energy trying to do many things, but do we spend time on what’s really important? Indicate how much time you spend on, or how important the following are to you. (Be honest) ACTIVITY Going online to chat with friends or check emails Spending time to get a guy or girl notice you Working to get a car, or for money to buy gas and insurance Playing sports, practicing, or traveling around to compete Attending church youth functions, camps or outreach events Doing homework or studying for that exam Sitting in front of the television or surfing the Internet Listening to music or going to concerts Spending quality time alone with God LOW HIGH 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 Discussion Questions: ● ● ● ● If you feel comfortable doing so, share your answers with others in your group. Does spending time alone with God take a priority over everything else? Are there any activities in your life that you are spending too much time on? Isn't it okay to spend lots of time on things you really enjoy, as long as it isn't something bad? ...

Words: 278 - Pages: 2

Cmis 102

...Course: CMIS 102  Date: 1/23/2014 Problem: 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. We are trying to calculate the square feet of a 4 bedroom house To do this, I will need to know each room’s length and breadth, then calculate each room’s area before I will then find the total. Map: When * = times Sum = total Room# =Room number Length# = length or a particular room Breadth# = breadth or a particular room Formula: Area of Room1=length1*breadth1 Area of Room2=length2*breadth2 Area of Room3=length3*breadth3 Area of Room4=length4*breadth4 The total Number of Square Foot’s = Area of room1+ Area of room2+ Area of room3+ Area of room4 Program Design Pseudo code: Start Declare the variables v ,A as integer length[4], breadth[4],area[4] as double array sum as double Display “Enter the Rooms length and Breadth” For v = 1 to 4 do Accept length[v], breadth[v] Next v Display “Finding Area and total number of square foots” Set sum =0 For A= 1 to 4 Area [A] = length [A]* breadth [A] Sum = sum + Area [A] Next A Display “Total number of square foots”, sum Stop Program Comments and Test Data C++ code: #include<iostream> #include<string> Using namespace std; int main() { int v,A; double length[4], breadth[4] ,area[4], sum; } cout<<"\nEnter the length and breadth of each room"; for (v=0;v<4;v++) { cout<<"\nRoom......

Words: 420 - Pages: 2

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

Cmis 102

...1. Problem definition: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. 2. Problem Analysis: The program will inform user to input family member name, age and state. The program will take the years of all members entered and add them together and then take the total of members entered (10) and divide the total coming up with the average age. The program will also calculate and identify each state of each person entered and using the defined input identifies those people from Texas and prints their names out only. The output of the program is three fold. The total average age of all family entries, identify who is from TX and print their name out. The program is to calculate the total average of the family age wise and determine their location with only printing out those members that are from Texas (TX). The program will take inputs from the user who will input the name, age and location of each family member. The program will take the years of all members entered and add them together and then take the total of members entered (10) and divide the total coming up with the average age. The program will also calculate and identify each state of each person entered and using the defined input identifies those people from Texas and prints their names out only. The output of the program is three......

Words: 517 - Pages: 3

Cmis 102

...In this homework, you will design a program to perform the following task: 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. Before attempting this exercise, be sure you have completed all of chapter 3 and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter. As before, there are 3 main components of your submission including the problem analysis, program design and documentation, and sample test data. 1.Using a similar approach as example 3.6 (textbook page 146): “A new Car Price Calculator”, provide your analysis for the following problem statement: You need to write a program that will calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from newegg.com. You will need to conduct some analysis on newegg.com (or amazon.com) regarding the possible options and prices to be considered. However; assume the computer will consist of the following components: CPU Case Power supply Motherboard Hard Drive RAM DVD Sound Card Monitor Graphics Card Operating System I would recommend you keep the option choices limited to 3 different components, or your program will really grow fast. For example, you could provide options for the Operating System (Windows 7, Red Hat Linux), the RAM (4 MB, 8 MB, 12 MB) and the Hard Drive Size (500 GB...

Words: 597 - Pages: 3

Cmis 102 Assignment 2

...total square footage of our four-bedroom house (Area RM1 + Area RM2 + Area RM3 + Area RM4 = Total Square Footage). Design: Calculate the Total Square Footage of a 4-Bedroom House written in Psuedocode: Calculate Square Footage of each room: Room One: 1. display “LR1” 2. get length “14” 3. display “WR1” 4. get width “20” 5. calculate area = length x width “14 * 20” 6. display area “AR1” 7. get “280” 8. stop Room Two: 1. display “LR2” 2. get length “12” 3. display “WR2” 4. get width “13” 5. calculate area = length x width “12 * 13” 6. display area “AR2” 7. get “156” 8. stop Room Three: 1. display “LR3” 2. get length “14” 3. display “WR3” 4. get width “16” 5. calculate area = length x width “14 * 16” 6. display area “AR3” 7. get “224” 8. stop Room Four: 1. display “LR4” 2. get length “20” 3. display “WR4” 4. get width “16” 5. calculate area = length x width “20 * 16” 6. display area “AR4” 7. get “320” 8. stop Calculate Total Square Footage of the house by combining the square footage of each room. 1. display “AR1, AR2, AR3, AR4” 2. get “280, 156, 224, 320” 3. calculate Total Square Footage = AR1 + AR2 + AR3 + AR4 “280+156+224+320=T” 4. display total “T” 5. get “980” 6. stop A flow chart has been created to help understand the program creation in a different view: To make sure that we get......

Words: 843 - Pages: 4

Cmis 102

...Analysis: User will be asked to provide length and width of the rectangle through keyboard. The program will consist of three modules. These include * Main module: This module will be the main starting module. It is responsible to get user input and call other modules to calculate and display rectangle area and perimeter. * calcArea module: This module will take rectangle length and width as input and return rectangle area as output. Area will be calculated as: Area = length x width * calcPerimeter module: This module will take rectangle length and width as input and return rectangle perimeter as output. The parameter will be calculated as: Perimeter = 2 x width + 2 x length * displayResults module: This module will take Area and Perimeter of the triangle as input arguments and display results to the user. 2. Provide your program design for the problem you analyzed for calculating and displaying the area and perimeter of a rectangle. Always work for modular design where possible. Be sure to use separate functions for calculating the area and perimeter of the rectangle. Other subprograms for Input and Output should be included as needed. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls, and a Hierarchy chart for the program. Finally, display the flow charts......

Words: 489 - Pages: 2

Cmis 102

...each room. The formula to achieve this is: Length x Width (LxW). The area of each is room then summed up to determine to actual square footage of the house, which is the actual usable living space. The variable name is “a” for area which was used to test and run the program. Please see calculations and table: Area of Room 1= Length1 x Width1 (14*12)=168 Area of Room 2= Length2 x Width2 (9*12)= 108 Area of Room 3= Length3 x Width3 (8*11)= 88 Area of Room 4= Length4 x Width4 (13*13) =169 Area of Room 1 + Room 2 + Room 3 =Room 4 = Total Square footage (533) Useable square footage of a house Total number of Rooms = 4 Area=L x W of each room Variables= Area Perform Calculations: Length x Width Room 1 = 168 Length x Width Room 2 = 108 Length x Width Room 3 = 88 Length x Width Room 4 =169 Output Results: 168+108+88+169= 533 Pseudocode Test 1: #include int main () { /* variable definition: */ int a ; /* variable initialization */ a = 14*12+9*12+8*11+13*13 ;printf("Integers (a) are : %d\n", a); return 0; } Success time: 0 memory: 2008 signal:0 Integers (a) are : 533 Test 2: #include int main () { /* variable definition: */ int a ; /* variable initialization */ a = 10*14+7*14+12*14+13*14 ;printf("Integers (a) are : %d\n", a); return 0; } Success time: 0 memory: 2008 signal:0 Integers (a) are : 588 Test 3: #include int main () { /* variable definition: */ int a ; /* variable initialization */ ......

Words: 367 - Pages: 2

Cmis 102 Assignment 1

...Jeremy Lovell CMIS 102 7987 Introduction to Problem Solving and Algorithm Design (2152) Bryan Nilsen 29 March 2015 NLT: 11:59 PM Program Description: This program will calculate the total usable square feet of a house by multiplying the length of width of each room and add up the product of each room to give the total square feet. Analysis: I know to calculate square feet of a room you have to multiply the length and width. Since the house has multiple rooms to get the total square feet you have to add the square feet of each room to get the total. I decide to create the input simple by giving the variables names that are easily identifiable. L stands for Length and W stands for Width, RM stands for room which is the product of the corresponding Length and Width. Finally SgFT is the sum of all three RMs. I used these variable names to easily see within the program where I get there data values. Test Data: | Input: | Output | Test Case 1: | Room1: length=10, width=20 Room2: length=15, width=10 Room3: length=20, width=15 | Total Square Feet: 650 | Test Case 2: | Room1: length=13, width=11 Room2: length=9, width=7 Room3: length=22, width=19 | Total Square Feet: 624 | Test Case 3: | Room1: length=8, width=6 Room2: length=4, width=12 Room3: length=30, width=25 | Total Square Feet: 846 | Pseudocode: //Declare Variables Declare L1, L2, L3, W1, W2, W3, RM1, RM2, RM3 and SqFT //Set Values of Variables Set L1=10 Set L2=15 Set L3=20 Set......

Words: 294 - Pages: 2

Cmis Homework 2

...<Name> Intro to Problem Solving and Algorithm Design CMIS 102 Professor March 30, 2015 My House Room 1 Length: 25’ Width: 17’ | Room 2 Length: 23’ Width: 11’ | | Room 4 Length: 23’ Width: 15’ | Room 3 Length: 25’ Width: 12’ | | Program Description * To identify the total square footage of the entire house by using mathematical equation and creating a C++ program to run the equation showing the formula and total area. Analysis * First thing is to identify the dimensions of each room and add those dimensions to get the total square footage of the house. * Variables: * L = Length * W = Width * R1 = Room 1 * R2 = Room 2 * R3 = Room 3 * R4 = Room4 * Formula: * Dimension – L x W = Room Area (sq. ft.) * Total Square Footage – R1+R2+R3+R4 = House Area (sq. ft.) Test Plan Test Case # | Input | Expected Output | Room 1 | Length: 25’ x Width: 17’ | 425 square feet | Room 2 | Length: 23’ x Width: 11’ | 253 square feet | Room 3 | Length: 25’ x Width: 12’ | 300 square feet | Room 4 | Length: 23’ x Width: 15’ | 345 square feet | Entire House | Total Square Footage = 1323 square feet | Pseudocode #include <stdio.h> int main () { /* variable definition: */ int a, b, c, d, e, f, g, h, i, j, k, l; float m,n,o,p,q; /* variable initialization */ a = 25; b = 17; c = a * b; d = 23; ...

Words: 380 - Pages: 2

Cmis 102 Homework 1

...this particular room. The same length times width (L x W) formula will then be used for all subsequent rooms. After the area for all four rooms has been found, the sum of the area of each room will be the final output for useable square feet. The output values are as follows: * L1: The length for room 1 * W1: The width for room 1 * L2: The length for room 2 * W2: The width for room 2 * L3: The length for room 3 * W3: The width for room 3 * L4: The length for room 4 * W4: The width for room 4 * T1: Total square feet for room 1 * T2: Total square feet for room 2 * T3: Total square feet for room 3 * T4: Total square feet for room 4 * Total_SqFt: Total useable square footage in the house Test Plan: Test Case # | Input | Expected Output | 1 | Room 1 - Length:20 Width:14Room 2: - Length:16 Width:12Room 3: - Length:22 Width:16Room 4: - Length:12 Width:10 | Square Feet: 944 | 2 | Room 1 - Length:17 Width:11Room 2: - Length:11 Width:9Room 3: - Length:13 Width:16Room 4: - Length:19 Width:12 | Square Feet: 722 | 3 | Room 1 - Length:10 Width:8Room 2: - Length:12 Width:10Room 3: - Length:14 Width:12Room 4: - Length:16 Width:14 | Square Feet: 592 | Psuedocode: //This program will calculate the useable area of a house with four rectangular rooms in square feet //The sum of all areas of each room will be the final output value for useable square footage //Declare variables Declare L1, W1, L2, W2, L3, W3, L4,......

Words: 653 - Pages: 3

Cmis 102

...Pseudocode for the program // Declaring variables Declare Integer InternetHits[10] Declare Integer i // Loop for inputting values For i = 0 to 9 Print 'Enter the value-'    Print i+1 Input InternetHits[i] End For // End of Program. 1. #include <stdio.h> 2. int main () { 3. int internetHits[10]; 4. int hits; 5. int counter; 6. for(counter=0;counter<10;counter++){ 7. printf("Enter number of hits: "); 8. scanf("%d",&internetHits[counter]); 9. } 10. //Display Values 11. printf("Entered values are: \n"); 12. for (counter = 0;counter<10;counter++){ 13. printf("%d\n",internetHits[counter]); 14. } 15. return 0; 16. } ************************************************************************* Question Design and write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (length and width) are provided by a user. There are 4 components of your submission including: Program Description- A detailed, clear description of the program you are building. Analysis- Demonstrates your thought process and steps used to analyze the problem. Be sure to include the......

Words: 790 - Pages: 4

Cmis 102 Homework 1

...Peter Doyle CMIS 102 Prof. Tanney HW1 Purpose of the program This program will be used to determine the square feet of usable space in each individual room and those values will be added together to get the total usable area of square feet in house with length and width values of up to four rooms being the only known value BEGIN define variables for rooms and total usable space room numbers and area of each room will be will be represented by integers r1 through r4 total usable area in the house will be represented by Usable_space which define variables of length and width for r1-r4, integer l1,l2,l3,l4,w1,w2,w3,w4 //the values for length and width will be added by user input l1,w1,l2,w2,l3,w3,l4,w4 //Length will be known as L and will have the integers of L1 through L4. L1through L4 will correspsond to the the integer “L” with the same number //Width will be known as “W” and will have the integers of w1 through w4 with the numbers corresponding to the integer “w” with the same number r1=L1*w1; r2=L2*w2; r3=L3*w3; r4=L4*w4; define formula to get total usable square feet Usable_space=(r1+r2+r3+r4); Have program show with printf command Usable square feet for each room and total usable square feet: “ The individual rooms r1-r4’s (respectively) usable area in square feet is r1,r2,r3,r4. The total usable square feet of your house with those given values is Usable_space.” END Code and run test cases. If successful code is good to go. Test......

Words: 354 - Pages: 2

Cmis 102

...1.What information do you consider important to be conveying to the general public regarding the impact of the acute usage of alcohol on the body? usage of alcohol can have many negative effects on the body. Over time and with long term use an individual can develop both physical and emotional symptoms. Physical symptoms can include liver failure, changes in brain function. 2. Discuss the arguments for and against classifying alcohol dependence as a disease. Are there differences with drug addiction? How about compulsive gambling? Alcoholism is a primary chronic disease with genetic psychosocial and environmental factors influencing its development and manifestations. The disease is often progressive and fatal. People use the terms drug abuse and addiction. One can abuse drugs without necessarily being addicted to drugs. Drugs abuse specifically requires that drugs have a negative effect on the user’s life. Drug addiction the addict has developed a tolerance to drugs increasing the used amount and experiences withdrawal. Compulsive gambling disorder is uncontrollable urge to keep gambling despite the tool it takes on your life. 3. One treatment method utilized for withdrawal is pharmacologic treatment. Discuss your perspectives of using pharmacologic treatment, what are the pros and cons?   treatment for alcohol withdrawal is only works if the patient is correctly taking the medication. If a patient would rather drink thank take the prescribed medication than......

Words: 253 - Pages: 2

Cmis 320 Homework 2

...Ayman Abdeldayem CMIS 320 A piano manufacturer wants to track all pianos it makes. Each piano has a unique serial number and a manufacturing completion date. Each instrument represents exactly one piano model, all of which have an identification number and model. The company produces thousands of pianos of a certain model, and the design is specified before any single piano exists. 1. Identify the degree and cardinalities of the relationship. The degree is the number of attributes in a relation. For this company, the attributes to distinguish between the products would be serial number, completion date, piano model, and identification number. This company makes thousands of pianos per model, and makes many different models. “Cardinality is the number of tuples in a relation,” in this case, a tuple would be a single piano model. So depending on the number of different piano models they produce will be the cardinality. 2. Express the relationships graphically with an E-R diagram. A vendor builds multiple types of tablet computers. Each has a type, identification number, and a name. The key specifications for each type include amount of storage and display type. The company uses multiple processor types, exactly one of which is used for a specific tablet type. The same processor can be used in multiple types of tablets. Each processor has a manufacturer and a manufacturer's unique code that identifies it. 1. Identify the degree and cardinalities of the......

Words: 326 - Pages: 2