DOC PREVIEW
WVU CS 110 - Computing Notes

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 110 Notes – Computing 1 Copyright C. Tanner 2010 Computing • Hardware o Everything goes through main memory  Including things stored on disk o Types of computers  Super, Mainframe, Mini, Personal • Software o Programs and Data which make computer work o Types  System • Operating System o Purpose is to control hardware and users interaction with computer o Examples -- Windows, Linux • Network Software o Allows sharing of resources and communication between users • Tools o Compilers  High level languages are converted to machine language 1-n Input Main Memory IRPC…etcALUCPU OUTPUT IOCS 110 Notes – Computing 2 Copyright C. Tanner 2010 o Assemblers  Assembly Language programs are converted to machine language 1-1  Application Software • Allows the computer to do something specific • Uses the OS to manipulate the hardware • COTS o Commercial off the shelf o Come as is o General purpose – Word Processor, spread sheet, database, graphics, etc o Special purpose -- Communications, WWW • Special purpose –library, bookkeeping, Video Store, o Embedded -- Cash register, Microwave • Custom Built o Uses a High Level Language such as  JAVA, C, C++, ADA, Basic, Prologue, SPSS, SAS, LISP etc  Each has a specific grammar (rules) which must be translated by a compiler into machine language • Developing Software o Steps/Stages  Understand the Problem • Determine WHAT the program must do • Determine test cases to demonstrate it does what it is supposed to do  Design Solution to Problem  Implement the solution in HLL • Translate the design into HLL  Verify • Test and Debug • With test cases previously determined  Maintain o Problem Solving Techniques  Algorithm • General solution to a problem • analogies – recipe, instructions, graphics to assemble something • formal definition o a step by step procedure for solving a problem in a finite amount of time  Solving by Analogy • Use as a starting pointCS 110 Notes – Computing 3 Copyright C. Tanner 2010  Means Ends Analysis • Determine the beginning and ending objectives then determine how to go from one to the other  Divide and Conquer • Continually and iteratively break the problem into smaller problems (which are more manageable)  Building Block/Composition • Use existing solutions for smaller problems • REUSE model  Merging Solutions • Combine existing solution so as to avoid duplication • Types of Programming Language Statements o Sequential  Performed (executed) in the order they appear o Selection  Chooses between sets of statements based on the value of a Boolean expression o Iteration/Repetition  Repeats a set of statements a number of times or until a condition is reached o Modular  Creates a unit out of a set of statements which can be performed (executed) through a single name • Problem -- Mechanical Man o Statement Set/Instruction Set  Sequential • STAND • SIT • STOP • RAISE • LOWER • STEP • TURN • ADD • SUB  Selection Conditions • ZERO • WALL  Repetition • Repeat Until stmtsCS 110 Notes – Computing 4 Copyright C. Tanner 2010 End Repeat o Test Cases ----CS 110 Notes – Computing 5 Copyright C. Tanner 2010 • Pseudo-Code for Sequential Statements of a General Purpose Programming Language o get  assign value from the user to a variable  example get radius assign value given by user to the variable radius o put  display value of variable to user  example put “radius: “ + radius display the verbiage “radius:” followed by the value of the variable radius o =  Assign variable a value  Examples x =5 assigns the value 5 to variable x x = y+z*c calculates the value of y+z*c and assigns it to x • Problems o Calculate the Circumference and Area of Circle o Test Cases --CS 110 Notes – Computing 6 Copyright C. Tanner 2010 o Convert a Centigrade temperature to its Fahrenheit equivalent. o Test Cases---CS 110 Notes – Computing 7 Copyright C. Tanner 2010 o Pythagorean Triples  A2 + B2 = C2  For m > n a = m2 - n2 b = 2mn c = m2 + n2 o Test Cases—CS 110 Notes – Computing 8 Copyright C. Tanner 2010 • Steps in Developing and Executing a Program o Use text editor to enter the program source code  Call it ProgramName.java o Compile the program  javac ProgramName.java o repeat above until the program is error-free  once error free bytecode version of program will be created • java’s machine language o combine bytecode with System utilities programs  loader  now ready to execute o load program into main memory  interpreter  translates bytecode into machine language


View Full Document

WVU CS 110 - Computing Notes

Download Computing Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Computing Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Computing Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?