Bookmark and Share

Front Back
Control Structures
Sequence, Repetition, Selection(decision).
Directs the computer to process the program instructions, one after another, it's on every program.
Repetition (loop)
Directs the computer to repeat one or more program instructions until some condition is met.
Selection Structure (decision)
Directs the computer to make a decision, and then selects an appropriate action to take based on that decision.
Set of step-by-step instructions that accomplish a task.
Problem Solving Process
1.Analyze the algorithm. 2.Plan the algorithm. 3.Desk-check the algorithm. 4.Code the algorithm. 5.Desk-check the program 6.Evaluate and modify (if necessary) the program.
Items needed to achieve a goal.
Is the goal programmers. When analyzing a problem, always determine the output first.
IPO Charts (Input, Processing, Output)
Is used to organize and summarize the results of a problem analysis.
Processing Item
Represents and intermediate value that the algorithm uses when processing the input into the output.
Tool programmers uses to help them plan the algorithm. English like.
Standardized symbols to show the steps the computer must take to accomplish the programmers goal.
Flow lines
Lines to connect the symbols.
Oval Parallelogram Rectangle Diamond
Start/End Inputs/Outputs Processing Items Decision
Assigning Names
Names can only contain letters, numbers and the underscore. They can not contain punctuation marks or spaces. If the name contains more than one word, capitalize the first letter in the second word and subsequent words. EX: raise, raiseRate
Data Types
Specifies types of data (ex: decimal, integer,) each item represents.
Initial Value
Is referred as initializing the item.
Is a word that has a special meaning in a programming language.
Statement ;
Simply a C++ instruction that causes the computer to perform some action after is executed, all statements must and with a semicolon ( ; ).
Sequences of characters, to perform standard input and output operations.
cout cin
Standard output stream, ex: cout << "Enter current weekly pay: "; Standard input stream, ex: cin >> currentPay;
insertion operator <<
"sends to" sends message to the screen (cout) Ex: cout << "Enter current weekly pay: ";
Extraction operator >>
"gets from" gets input from the keyboard. Ex: cin >> currentPay;
End of line. Advance the cursor to the next kine on the screen.
stream manipulator
Allows the program to manipulate or manage, the input and output stream characters in some way. Ex: endl
Refers to running the program.
Refers to the process of locating and removing any errors.
Syntax error
When the programmer enters an instruction that violates the language's syntax
Set of rules that you must follow when using the language.
logic error
When the programmer enters an instruction that does not gives you the expected results
Is a location in the computer's memory that the program is using while is running.
Source code
Programmer language instructions
Source file
File containing the source code.
Object code
Machine code. Ex: 00001110101001
Object file
File containing the object code.
Combines the object the object code with other code necessary for your C++ program to run.
Who and When C++
C++ evolved from the procedure-oriented C programming language, which was developed in 1972 at Bell Laboratories by Dennis Ritchie In 1985, Bjarne Stroustrup (Bell Laboratories) added object-oriented features to C C++ is a superset of C
Comment (internal documentation) //
A message to the person reading the program EX: //Created by Abi Mendez
Executable file
File that contains all of the machine code necessary, to run the program as many times with out the need for translating again.
Integrated Development Environment
A block of code that performs a task. They have parenthesis following their names. Ex: int main()
Void functions
Do not return values after completing their assigned tasks
Function header
Marks the beginning of the function. Ex: int main()
Function body
Everything between the opening and closing braces
needs to be included on any program that uses cout to output and cin to input data from a keyboard
#include directive
special instruction that tells the compiler to include the contents of another file, with out having to retype the code.
using statements
they end with semicolon Ex: using std::cout; using std::cin; using std::endl;
int main()
the word main() is the name of a function. Must be typed with lowercase. A program always needs to have a a main() because here is were a program always begins.
{ }
Braces mark the beginning and the end of the code block that compromises the function.They will go right after int main(). Ex: int main() { code example } Ex:
Function body
Is everything enclosed in the braces.
x of y cards Next >|