Free Essay

The Computer Component Calculator

In:

Submitted By dalex
Words 927
Pages 4
Assignment 2 - 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.

Analysis

Input: the user’s choice for motherboard, CPU, and hard drive.

Process: The program will know the predetermined costs of the other components, BaseCost.
The input consists of the CPU choice, the motherboard choice, and hard drive choice submodules, CPU_Choice, MB_Choice, and HDD_Choice. The user will enter a choice for an option.
The program will determine the corresponding cost of the options: CPUCost, MBCost, and HDDCost.
The total cost of the computer system is calculated by the sum of all the individual components for the system
The BaseCost= CaseCost + PowerSupplyCost + MotherboardCost + HardDriveCost + RAMCost + DVDCost + SoundCardCost + MonitorCost + GraphicsCardCost + OperatingSystemCost
The TotalSystemCost = CPUCost + MBCost + HDDCost + BaseCost

Output: the user’s choices, the total system price in USD

Design

Step 1.) The Main module will call Compute_CPU_Choice, Compute_MB_Choice, and Compute_HDD_Choice submodules or terminate the program.
Step 2.) The program will add the BaseCost from preset values.
Step 3.) The program will request user input for CPUCost, MBCost, and HDDCost.
Step 4.) The program will add The TotalSystemCost = CPUCost + MBCost + HDDCost + BaseCost
Step 5.) The program will display the total cost of the computer in US dollars.

Main Module Declare variables
//Sum the base cost for the system
//Display main menu //User choice for CPU
Call CPU_Choice module
//User choice for Motherboard
Call MB_Choice module //User choice for Hard Drive
Call HDD_Choice module //Display the output results Call Display_TotalSystemCost End Main Module

Code

Main module

//This program calculates the total price of a computer system
//The user is prompted for CPU, MB, and HDD inputs
//D. Alexander 20140223

//Declare variables used for total
Declare CPUCost as Float
Declare MBCost as Float
Declare HDDCost as Float
Declare BaseCost as Float
Declare TotalSystemCost as Float

//Declare variables used for base cost
Declare CaseCost as Float
Declare PowerSupplyCost as Float
Declare RAMCost as Float
Declare DVDCost as Float
Declare SoundCardCost as Float
Declare MonitorCost as Float
Declare GraphicsCardCost as Float
Declare OperatingSystemCost as Float

//Calculate base computer cost
Set CaseCost = 150.00
Set PowerSupplyCost = 235.00
Set RAMCost = 599.99
Set DVDCost = 145.00
Set SoundCardCost= 275.50
Set MonitorCost = 499.99
Set GraphicsCardCost = 376.99
Set OperatingSystemCost = 199.99
//BaseCost will be $2482.46
Set BaseCost= CaseCost + PowerSupplyCost + MotherboardCost + HardDriveCost + RAMCost + DVDCost + SoundCardCost + MonitorCost + GraphicsCardCost + OperatingSystemCost

//Display welcome message
Write “The Computer Component Calculator”
Write “The Current Price Of Your Computer: $ ” + BaseCost
Write “Make Your Selection From The Following Menus”

//Declare variable used for main menu
Declare Choice As Integer

//Display main menu
Write “To Select A CPU………………………..enter 1”
Write “To Select A Motherboard…………….....enter 2”
Write “To Select A Hard Drive…………………enter 3”
Write “To Quit…………………………………..enter 4”
Input Choice

//Options the user can enter to navigate
Select Case of Choice
Case “1”:
Call CPU_Choice submodule
Break
Case “2”:
Call MB_Choice submodule
Break
Case “3”:
Call HDD_Choice submodule
Break
Case “4”:
Write “Goodbye”
Break
Default:
Write ”Your Response Was Invalid”
End Case

//User choice for CPU
Call CPU_Choice module

//User choice for Motherboard
Call MB_Choice module

//User choice for Hard Drive
Call HDD_Choice module

//Display the output results
Call Display_TotalSystemCost
//Calculate total computer cost
Set TotalSystemCost = CPUCost + MBCost + HDDCost + BaseCost

End//End Main

Submodule CPU_Choice

Clear Screen
//This module prompts the user to enter a choice
//The menu displays the choices

Declare CPUChoice As Character

//Display the menu
//Prompt user for the input
Write “Choose your CPU:”
Write “AMD FX-9590 4.7GHz…………....enter c”
Write “Intel Core i7-4930K 3.4GHz……….enter x”
Write “Intel Core i7-4960X 3.6GHz……….enter z”
Write “Make A Selection: “
Input CPUChoice

//The user determines the input
Select Case of CPUChoice
Case “c”:
Set CPUCost = 369.99
Break
Case “x”:
Set CPUCost = 579.99
Break
Case “z”:
Set CPUCost = 1049.99
Break
Default:
Write ”Your Response Was Invalid”
End Case

Submodule MB_Choice

Clear Screen
//This module prompts the user to enter a choice
//The menu displays the choices

Declare MBChoice As Character

//Display the menu
//Prompt user for the input
Write “Choose your Mother Board:”
Write “AMD ASUS Sabertooth 990FX……….enter c”
Write “Intel MSI Z87-GD65…………………..enter x”
Write “Intel ASUS Maximus VI Hero………...enter z”
Write “Make A Selection: “
Input MBChoice

//The user determines the input
Select Case of MBChoice
Case “c”:
Set MBCost = 184.49
Break
Case “x”:
Set MBCost = 187.99
Break
Case “z”:
Set MBCost = 199.79
Break
Default:
Write ”Your Response Was Invalid”
End Case

Submodule HDD_Choice

Clear Screen
//This module prompts the user to enter a choice
//The menu displays the choices

Declare HDDChoice As Character

//Display the menu
//Prompt user for the input
Write “Choose your Hard Drive:”
Write “OCZ Vector 150 Series 480GB (SSD)………enter c”
Write “PNY Prevail Elite 480GB (SSD)…………….enter x”
Write “Mushkin Enhanced 960GB (SSD)…………...enter z”
Write “Make A Selection: “
Input HDDChoice

//The user determines the input
Select Case of HDDChoice
Case “c”:
Set HDDCost = 389.99
Break
Case “x”:
Set HDDCost = 662.68
Break
Case “z”:
Set HDDCost = 974.95
Break
Default:
Write ”Your Response Was Invalid”
End Case

Submodule Display_TotalSystemCost

//Calculate total computer cost
Set TotalSystemCost = CPUCost + MBCost + HDDCost + BaseCost
Write “The Total Price Of Your Computer: $ “ + TotalSystemCost

Test Data

BaseCost CPUCost MBCost HDDCost TotalSystemCost
2482.46 369.99 184.49 389.99 3426.93
2482.46 579.99 187.99 662.68 3913.12
2482.46 1049.99 199.79 974.95 4707.19
2482.46 369.99 187.99 662.68 3703.12
2482.46 579.99 184.49 389.99 3636.93

Similar Documents

Premium Essay

History of Computers

...“HISTORY OF COMPUTERS” CIS 110 March 13, 2010 The history through Computer and its timeline defines the beginning for where it all began. Let’s start in the year 1939 where David Packard and Bill Hewlett first started there company there first product was called the HP 200A Audio Oscillator which was a popular piece of test equipment for the engineers Walt Disney Pictures was their first customer and ordered eight of the 200B model to use as sound effects generators for the movie “Fantasia” in the 1940s the first (CNC) that was build was call “The Complex Number Calculator” designed by researcher George Stibitz and demonstrated in New York at the Dartmouth College. This demonstration showed that this was to consider to be the first remote access computing using a teletype connected via special telephone lines through this timeline.( 2006 Computer History Museum) it will show that from the moment Computers was thought of and how the build went through a concept of steps before fully calling a (PC) an Personal Computer a lot of what I have read and seen through the timeline of the history of are computers for every new year a new chapter starts in building a fully functional computer but over time is where it took for where it all began as different components that different Engineers build. To get or build a fully functional computer from the components that make it you will start with a Case, Power Supply, Motherboard, Microprocessor, Memory, Drive Controllers, Hard disk...

Words: 1191 - Pages: 5

Premium Essay

Cos-101 Written Assignment 1

...COS-101 Written Assignment 1 What is the most important difference between a computer and a calculator? • A calculator is a computer with specific program or set of instruction for mathematical calculations • A computer is equipment that is centralized around the CPU, microprocessor running specific instruction or application. Calculator is a program or app that can run on a computer • So the most important difference is the set of instruction that each is designed for. A calculator instruction is specific for mathematical calculation and a computer can accept different programs for several different computation or task. How are computers today similar to those from World War II? How are they different • Today computers are much faster than its WW II predecessor, the size of today’s computer can fit on a desk, as compared to an entire room. Today computers are much more reliability due to modern material and advance manufacturing techniques, and don’t break down every 7 minutes • The design, material, size of computers may have drastically changed since World War II, but before computer become self-aware, both era of computers follow and receive program instruction for a certain task. Computer are designed to compute and performed task faster, and make our life easier The way people use the Internet has changed since the early days. How? • The internet earlier das were used by the military and educator which was limited to file transfer and the email...

Words: 738 - Pages: 3

Free Essay

Nurse

...Chapter 1 1) The most important difference between a computer and a calculator: calculator is a handheld device perform basic math operation while the computer is a multipurpose device which can also perform complex calculation, while a calculator caries one operation at a time, computers with the help a series of instructions called computer program can carry out the entire task without assistance. 4) Is a smart phone a computer explain your answer. smart-phone is a hand held device that integrates mobile phone capacities with more common features of handheld computers. A smart-phone has cellular capabilities and built-in application with Internet access. It also provides digital voice services as well as text messaging, e-mail, web browsing , applications that help download music, mp3 players, banking and other functions. The world today is relying more on smart-phone for uses when away from a desktop. it serves as a computer as it carries out computer programs without assistance. 2)The computer today similar to those from world war II ,In the sense that they make repeated calculations more quickly than the human brain. computer today are different to those from world war II because,we have gone from the vacuum tube to the transistor, to the microchip. Then the microchip started talking to the modem. Now we exchange text, sound, photos and movies in a digital environment....With the advent of everyday use of elaborate calculations, speed has become paramount...

Words: 737 - Pages: 3

Premium Essay

Cos 1

...Lopez Cos 101 Prof. K. Lee Assignment #1 Chapter 1 What is the most important difference between a computer and a calculator? [RQ, no. 2] The most important difference between a computer and a calculator is that in the computer you can write, navigate in the web, investigate about anything, play games, and other things meanwhile in the calculator you only can do math work. How are computers today similar to those from World War II? How are they different? [RQ, no. 3] The similarities between today’s computer and World War II are that they have the same technology and they use the same chips. There was only one electronic computer in World War Two, which was called ENIAC, and was a building full of vacuum tubes. It was built to calculate artillery projectile paths, and had to have the program wired in. It had no memory, and displayed the output with glowing lights. World War 2 computers were huge that have to take of a whole room, lag a lot, and much more complicated to use. Today’s computers are a lot faster, smarter, better technologies and more compact, and easy to use. The way people use the Internet has changed since the early days. How? [RQ, no. 4] Yes, because we use internet to find information, to communicate with others around the world and it’s a lot faster to obtain information then reading a book. Is a smart phone a computer? Explain your answer. [RQ, no. 7] Yes, because you have the ability to do everything such as web search...

Words: 562 - Pages: 3

Premium Essay

Computer Technology

...Final Project: Expository Essay Samantha A. Medina University of Phoenix Final Project: Expository Essay Computer technology has developed tremendously over the decades and centuries to become so modern in every aspect including education and personal leisure. It is breath taking to see how modernized out computer technology is today as opposed to the limited computer technology that was available in history. The changes that have occurred over history to today will be discussed and focused upon in this essay. The Mechanical Era: Early Computing Devices The Abacus The abacus was the first machine to be used computational science. It is considered to be the first computer. This machine was inspired by one of Charles Babbage’s designs. The abacus could process 15 digit numbers and calculate fourth-order differences. In 1885 the machine won gold medal at an exhibition in Paris and also helped calculate the orbit of mars! The abacus is still in use today. Imagine that a computing device from centuries ago still being used to this day! Charles Babbage Charles Babbage was an English mathematician, philosopher, inventor and mechanical engineer ("Charles Babbage", 2012). Babbage is known to have invented the first programmable computer. As stated earlier his design inspired the abacus and other complex designs. He won the Gold Medal of the Royal Astronomical Society for inventing an engine for calculating mathematical and astronomical tables. Babbage was also Lucasian Professor...

Words: 1624 - Pages: 7

Premium Essay

Cos 101 First Assignment

...QUESTIONS CHAP 1. 2. What is the most important difference between a computer and a calculator? Calculators can perform operations one at a time, while computers can process a sequence of operations using provided instructions. 3. How are computers today similar to the first computers? How are they different? They can both takes large amounts of data and simplify it so someone can understand. The first computers were bulky, slow, and expensive due to the parts that were available at the time, today they are more compact, faster, and cheaper with the discovery of items like the circuit card and silicon chips. 4. The way people use the internet has changed since the early days. How? As late as the 1980’s, the internet was still the domain of researchers, academics, and government officials, who used it to transfer files and exchange electronic mail (email) messages, In the 1990’s millions of people now connected to the internet each day through browsers. The internet’s transformation from a text-only environment into a multimedia landscape incorporating pictures, animation, sounds and video. 7. Is a smartphone a computer? Explain your answer. A smartphone is a computer. A smartphone typically combines the function of a phone, camera, P.D.A, a game machine, video/music player with internet connectivity and the ability to run apps. The iPhone and other smartphones are powerful, pocket-sized computers that use Apps to perform all kinds of functions that preciously required...

Words: 389 - Pages: 2

Premium Essay

Nt 1110 Assignment 1.1 History Timeline of the Computer

...Assignment 1.1 History timeline of the computer • 1939 Hewlett-Packard is founded. David Packard and Bill Hewlett found Hewlett-Packard in a Palo Alto, California. Their first product was the HP 200A Audio Oscillator, which rapidly becomes a popular piece of test equipment for engineers. • 1940 The Complex Number Calculator (CNC) is completed. George Stibitz demonstrated the CNC at an American Mathematical Society conference at Dartmouth College. Stibitz performed calculations remotely on the CNC using a Teletype connected via special telephone lines. This is the first demonstration of remote access computing. • 1941 Konrad Zuse finishes the Z3 computer. Using 2,300 relays, the Z3 used floating point binary arithmetic and had a 22-bit word length. • 1942 The Atanasoff-Berry Computer (ABC) is completed. The ABC was designed and built by Professor John Vincent Atanasoff and graduate student Cliff Berry between 1939 and 1942. • 1944 Harvard Mark-1 is completed. Created by Howard Aiken, and designed and built by IBM, the Harvard Mark-1 was a room-sized relay-based calculator. This machine had a fifty-foot long camshaft that synchronized the machine’s thousands of component parts. • 1946 The first glimpse of the ENIAC, a machine built by John Mauchly and J. Presper Eckert that improved by 1,000 times on the speed of its contemporaries. • 1949 Maurice Wilkes assembled the EDSAC, the first practical stored-program computer, at Cambridge University. For programming the EDSAC...

Words: 461 - Pages: 2

Premium Essay

Computers

...Computers in Our World Our world is constantly evolving. The only thing in life that is constant is change, and Computers are no different. Even though computers have only existed in the last seventy years, many believe computers have changed the world more than any other technological advance. Over the past seventy years, computers have made a quick evolution into our world with several major advancements. Just as with all things, however, there was a beginning to the computer generation. Computers were invented to solve “complex mathematical problems using calculators within a computer(De la Bedoyere,1). Computers now can do anything within a large box. A desktop computer has many external parts joined together. A computer consist of a mother board,the motherboard controls and processes what is typed and clicked and programs running. The middle of the motherboard consist of all the work being processed. Including work and data which is sent through the motherboard to the Central Processor unit (CPU). The computer has to hold memory also to save things within computers. The Ram is a major component in saving information but only works when the computer, is running. The reason a Ram is used is to save and store information,so that when it is being worked on it wont be erased. A Computer also has external and internal drives that can read information. When the computer came out for personal use, it made it better for communication possibilities(ceruzzi,6,7) 1939 was an imperative...

Words: 1404 - Pages: 6

Premium Essay

User Interface- Extended Definition

...User Interface A User Interface (UI) refers to the component of a computer program through which humans and machines exchange data and instructions in order to complete a task (User Interfaces). The data and instructions can be exchanged through a growing number of mediums such as text or graphical stimuli. Computer scientists go to great lengths to design and implement UIs, as they are imperative to the efficacy of the program they create. Without a working UI the computer and user would not be able to communicate with one another, severely limiting the ability of both. For instance, consider how difficult it would be to make a phone call if your phone did not provide you with a contact list or dialing pad. You would still be able to call, but it would take a much deeper level of knowledge to accomplish one of the phone’s most basic functions TYPES OF UI A UI will generally fall into one of 3 categories: command line, menu driven, and graphical 1. Command Line The oldest and least common UI is the command line interface. The command line interface is comprised solely of text. This type UI will accept input almost exclusively through the keyboard and requires the user to be familiar with the commands it accepts since no implicit direction is given. For example, Figure 1 shows a command line UI of a grade calculating program. There is no information given to the user other than the text on screen. Command line UIs are the most resource efficient of the three types of UI...

Words: 561 - Pages: 3

Free Essay

Rechargeable Calculator with Mp3

...Datamex Institute of Computer Technology RECHARGEABLE CALCULATOR W/ MP3 Submitted by: Albento Maricel Submitted to: Mr. Aris D. Artates Instructor Table of Contents Title Page I. Introduction………. 1 II. Overview……………2 III. How to Use Rechargeable Calculator w/ MP3… 4 IV. Handling Precaution.. 7 V. Trouble Shooting……..8 i And do not try to fix the damage because this may cause permanent damage and void the warranty of your rechargeable calculator w/ mp3. 9 cause interference with TV or Radio reception. * Avoid dropping your rechargeable calculator w/ mp3 and subjecting it to strong impact. * Do keep your rechargeable calculator away from moisture. Contact with water or any liquid may cause to malfunction and overheat. Troubleshooting When you encounter malfunction in your rechargeable calculator w/ mp3, just go to the nearest service center. 8 Introduction Calculator is made for calculating numbers such as: Addition, Subtraction, Multiplication and Division. But in our product you can enjoy listening music while you’re calculating because our calculator has a built-in mp3 that you can choose whatever music you want to play in the music playlist. This Rechargeable Calculator w/ MP3 is a pocket size and hand carry so you can enjoy of bringing it anytime, anywhere. And when the battery is empty you can charge your calculator w/ mp3 for 3-4 hours and when it’s already full you can use it up to...

Words: 553 - Pages: 3

Premium Essay

Depending on Technology

...a matter of social prestige, but because it reflects a picture of our daily lives. Cell phones, MP3, internet and many other modern technologies have become essential components of the lives. How many of us feel at loss and lack the ability to focus when you forget our cell phones somewhere, but once we have it back in our hands its as if we found treasure? How many hours do we in front of computer screens, messaging and chatting? Our earphones are deafening our ears with modern music and isolating us from everything that surrounds us, it is as if the whole world has become reduced and viewed only in a 14 inch screen. Modern technology affects our daily lives in every way and shaped our generation to the way it is. Why and how is this happening? What are the consequences of us as individuals and our social environment? With increasing impact of technology with its different effects on the life of teenagers and young generations , most studies call these young people to stay away, even temporary, from modern technology, pointing out that they need a short break between now and then to restore the spirit and enjoy the life and return to reality away from cyber space. We must control technology rather than have the technology controlling us. For example, we can talk about the problems that we have with computers, because when a...

Words: 850 - Pages: 4

Premium Essay

Computer

...Computer From Wikipedia, the free encyclopedia Jump to: navigation, search For other uses, see Computer (disambiguation). "Computer technology" redirects here. For the company, see Computer Technology Limited. A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem. Conventionally a computer consists of some form of memory for data storage, at least one element that carries out arithmetic and logic operations, and a sequencing and control element that can change the order of operations based on the information that is stored. Peripheral devices allow information to be entered from external source, and allow the results of operations to be sent out. A computer's processing unit executes series of instructions that make it read, manipulate and then store data. Conditional instructions change the sequence of instructions as a function of the current state of the machine or its environment. The first electronic computers were developed in the mid-20th century (1940–1945). Originally, they were the size of a large room, consuming as much power as several hundred modern personal computers (PCs).[1] Modern computers based on integrated circuits are millions to billions of times more capable than the early machines, and occupy a fraction of the space.[2] Simple computers...

Words: 6579 - Pages: 27

Free Essay

The Eniac

...NT-1110 Computer Structure and Logic Unit 4 Research Paper 1 The ENIAC Computer 4/26/13 World War II was knocking on the United States front door when the decision to develop a computer to handle complex mathematical calculations was made. The United States was in a dire need for a machine that could make accurate, precise, and fast calculations. The United States government and military turned to John Mauchly and John Presper Eckert to build the first Electrical Numerical Integrator And Calculator; or for short the ENIAC. The United States was ill prepared and forced into the war which meant that it had few resources to accomplish the task of defeating the enemy. The ENIAC was purposefully designed to calculate all variables such as wind speed, trajectory, and distance so that each shot fired from the military was done with devastating precision and accuracy. The ENIAC enabled the military to do these calculations in a matter of hours and minutes versus days. John Mauchly and John Eckert designed artillery tables using the ENIAC to make these vital calculations that were much faster than manually calculating. Unfortunately the design of the Electrical Numerical Integrator and Calculator was not completed until after the war. Although the ENIAC was designed for World War II, it had other uses for that time period. One of the greatest contributions that ENIAC had was with the development of the Hydrogen bomb. The ENIAC was able to calculate the complex mathematical formulas...

Words: 1347 - Pages: 6

Premium Essay

Fly By Wire Case Study

...Introduction: Fly-by-wire control system is the leap from the mechanical control system to the electric one by the aid of wires, hence the name “Fly-by-wire” comes from. Since the mechanical and hydro-mechanical flight control systems require a large amount of human resource effort to have control on the components of cranks, shafts, pulleys, cables and hydraulic pipes which are relatively heavy, unlike the (FBW) which is less complicated and more reliable uses computer and wires to transmit the signals. FBW is a closed loop (feedback) where servo controlled actuators restores stability of the aircraft, it recognizes the pilot’s commands as the required action whether it’s roll, yaw or pitch and converts it to electronic signals transmitted by wires and the flight control...

Words: 1060 - Pages: 5

Premium Essay

Computer - What Is It?

...For other uses, see Computer (disambiguation). "Computer system" redirects here. For other uses, see Computer system (disambiguation). "Computer technology" redirects here. For the company, see Computer Technology Limited. Computer | | A computer is a general purpose device that can be programmed to carry out a finite set of arithmetic or logical operations. Since a sequence of operations can be readily changed, the computer can solve more than one kind of problem. Conventionally, a computer consists of at least one processing element, typically a central processing unit (CPU) and some form of memory. The processing element carries out arithmetic and logic operations, and a sequencing and control unit that can change the order of operations based on stored information. Peripheral devices allow information to be retrieved from an external source, and the result of operations saved and retrieved. The first electronic digital computers were developed between 1940 and 1945 in the United Kingdom and United States. Originally they were the size of a large room, consuming as much power as several hundred modern personal computers (PCs).[1] In this era mechanical analog computers were used for military applications. Modern computers based on integrated circuits are millions to billions of times more capable than the early machines, and occupy a fraction of the space.[2] Simple computers are small enough to fit into mobile devices, and mobile computers can be powered by...

Words: 1954 - Pages: 8