Mod 3 Flashcards
Describe unstructured programming.
The most elementary method in which any line of code may be executed if logic dictates that action.
Describe procedural programming.
Groups statements that perform a specific task together.
Describe object oriented programming.
Using the concept of objects and their interactions to design applications and computer programs
What defines an object?
Classes which defines an objects attributes grouped together with behaviors. Objects do not exist until the programmer creates them.
What are the 3 common techniques Object oriented programming is based on?
Encapsulation,
Inheritance,
Polymorphism
What is encapsulation?
Conceals the functional details of a class from the user that the user does not “need to know”.
What is inheritance?
Possesses characteristics and behaviors from the parent class while introducing it’s own.
What is polymorphism?
Allows you to treat derived class members just like their parents class but achieve a different result.
What is a programming language?
How people talk to computer hardware.
What is machine code?
1st generation of programming languages. Native code to the computers CPU.
What is assembly language?
Earliest programming language and closest to machine code. 2nd generation. Composed of commands called MNEMONICS.
How does a CPU understand assembly language?
Assembly language is converted to machine code in a process called assembling, performed by an assembler tool.
What are compiled languages?
3rd generation. Not CPU specific. Requires a compiler to convert to machine code to be interpreted by CPU.
What is a compiler for C++?
g++
What is interpreted /scripting language?
Delays the immediate assembling/compiling process and instead the code is translated each time the program is run. 3rd gen.
what is JIT (just in time) compilation?
Blurs the lines between compiler and interpreted languages. 3rd gen. The source code is compiled to an intermediate byte code the translated by a virtual machine into machine language at run-time.
What is porting?
The process of taking a program from one language or system architecture to another.
What are the three techniques used by computer programs?
Sequential action,
Branches,
Loops
What is program flow?
The process of how a program executes. Branching and looping are referred to as flow control statements.
What is a flow chart?
Graphical representation of a process that demonstrates the steps followed to arrive at a solution.
What flow chart action is represented by an oval?
Terminal. Start/end of the program.
What flow chart action is represented by a rectangle?
Process. Action to be executed.
What flow chart action is represented by a rhombus?
Input/output. Acquire data from user or display data to user.
What flow chart action is represented by a diamond?
Decision. Branch based on a Boolean decision.
What is pseudocode?
Using natural language to define code or flow charts.
What is required before any else or else if statement?
An if or else if statement.
What are two branching statements?
If and else if.
What are the 3 loop statements?
While,
Do while,
For
What is the different between a while and do while statement?
A while statement will check a Boolean expression before it loops and if the condition is true perform the body of the loop. The do whole tests the conditions at the bottom. Always performed at least once.
What is the concept of embedding a statement in another statement?
Nesting.
What are the 4 stages of compilation?
Pre-processor, Compilation, Assembly, Linking. (PCAL)
What happens in the pre-processor stage?
Combined source codes into one logic file.
what happens in the compilation phase?
The output from the pre-processor phase is converted to assembly language.
What happens in the assembly phase?
Machine code is generated from the output of the compilation phase.
What happens in the linking phase?
Takes the machine code to produce an executable.
What is an executable?
And finished program. “The thing you click on”
What are the four parts of a program?
Declarations, Input, Processing, Output. (DIPO)
What are comments and what are the two types?
Comments are symbols used to indicate to the compiler that the text following should be ignored. Single line comment (//) and block or multi line comment (/* */)