You are on page 1of 2

7/9/12 Final Notes Hardware: Any physical component that you can see or feel.

Input Device: Keyboard, mouse. Allows you to input data and translate to machine language. Output Device: Printer, Monitor. Allows the output of information and translate to human language. Storage Device: Flash Drive, etc. All hard disks have tracks and sectors where information is stored. When something is formatted all content is erased, tracks and sectors are remade, and a new file location table is made. The root directory is where you start from, such as F:\. Program (Software): A set of instructions to tell a computer to perform a particular task. Data: Unprocessed items. Like raw chicken that is uncooked (doesnt mean you cant eat it). Data Types: There are different types of data such. You need to know the different types so you don't do something dumb like add two names (roboraiderrobotix! Raiderspamsquad!) One type of data would be a bool, which can be true or false. Information: generated from data. Information and data are two different things! Categories of Software: System software (OS), Application software (Word, Excel, Autocad blah blah HYDROLAZERZ), Programming language packages. Operating System: Manages hardware, applications+programming language packages, and users. With hardware, things such as a printer getting backed up and alerting the user to it or saying NOT SUFFICIENT MEMORY when a flash drive is full. Users are managed through user interfaces (DOS; GUI: Graphical User Interface; Dialogue Boxes; Check boxes, etc.). Processing: Equation or a formula. JPOS Cycle: Input Processing Output Storage Cycle. Analog/Digital Signal: Analog signals are made of continuous waves. Sound is analog (hey didnt we do this in physics?). Digital is on or off only - but precise. Algorithm: a sequence of instructions to perform a specific task is a program so this is the equation and the procedure. Languages: Machine Language: Binary, duh. Assembly Language: Includes using symbols like + for addition instead of binary. An Assembler translates the symbols into the machine language. High-Level Language: C++, C#, Java, etc. You can write words and not suffer through binary.

C++ Programming: Text editor: lets you type the code. Compiler: will translate the high level language to machine language robot. Can check for errors. Source code: programming language instructions written in a text editor. After writing the code you compile it to check for syntax errors. The compiler will list the type of error and the line number. Fix any errors, recompile, and it will be translated to machine language to become object code. Simple program:
#include <iostream> //a preprocessor directive using namespace std; //This is a statement. Statements end in a semicolon. int main () //main() is a function { cout << "Hello World!"; return 0; }

Key words in c++ must be written in lowercase! Preprocessor directives: these all start with the pound (#) sign. For example, #include <iostream> is a preprocessor directive that has all the input output stuff. These are written above main (). *There is only one main ()! Comments: use // to comment out one line of text or code Use /*To comment out block of text or code*/ Comments are written to describe what is going on. Always write the objective of your program at the top. int: an integer, which is a type of variable. Input/Output: << >> cin cout output operator input operator character in. For when you want some information to be put in. character out. For the information you want to display.

If you misspelled cout or something that would be a syntax error. When < and > are written they are called angled brackets. Escape sequences: /n newline *you can also use <<endl; instead of /n /t tab