1
Why Program?
Computer- Programmable machine designed to follow instructions
Program- Instructions in computer memory to make it do something
Programmer- person who writes instructions (programs) to make computer perform
a task
Categories of Software:
o System Software: programs that manage the computer hardware and
the programs that run on them.
Operating systems, utility programs
o Application software: programs that provide services to the user
Games
1.3
Machine language
Types:
o Low Level- Machine code
o High Level: closer to human language
C++
BASIC
Java
Visual Basic
COBOL
C#
FORTRAN
JavaScript
From High Level Program to an Executable File
1. Create file containing the program with a text editor
2. Run preprocessor to convert source file directives to source code program
statements
3. Run Compiler to convert source code program into machine language
4. Run linker to connect hardware- specific code to machine instructions,
producing an executable file
Steps 2-4 are often preform a s single command
Steps
1. Source Code
2.
3.
4.
5.
6.
7.
Preprocessor
Modified Source Code
Compiler
Object Code
Linker
Executable Code
Key Words
o Specific Usage in the language
o Also known as reserved words
o Have a special meaning in C++
o Cannot be used for any other purpose
Programmer- Defined Identifiers
o Names made up by the programmer
o Not part of C++ language
o Used to represent various things: variables (memory locations),
funtions, etc)
o Variables have to make sense to the user
Operators
o Used to perform operations on data
o Many types of operators
Arithmetic- ex. +, -, *, /
Assignment- =
o Some operators:
o <<, >>
Symbols
Punctuation
o Characters that mark the end of a statement, or that separates items
in a list
, and ;
Syntax
o The rules of grammar that must be followed when writing a program
o Controls the use of key words, operators, program- defined symbols,
and punctuation
Variables