Day 2 Flashcards

1
Q

What are the three Programming methodologies?

A
  1. Unstructured
  2. Procedural
  3. Object- oriented
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe Unstructured programs

A

a. Methodology is used for small, simple programs designed to run on dedicated hardware.
b. Difficult to manage once they grow in size and complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe Procedural Programs

A

a. Sometimes called a subprogram, subroutine, or function.
b. Source code organized by task with main block being able to call upon any procedure at any time
c. Reduces debugging by reducing amount of code.
d. When finished returns to call position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe Object-Oriented Programs

A

a. Method that uses concept of objects and their interactions to design applications.
b. Allows data to control what actions are available.
c. It’s COMPLEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two concepts that define each item in the real world?

A
  1. Attributes- characteristics of an objects

2. Behaviors- actions (methods) an object can perform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a class?

A
  • Blueprint that defines the abstract details of a thing; attributes and behaviors
  • REMEMBER: CAB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are attributes and behaviors collectively?

A

Members of the class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define: Object
Known as an instance of a class and does not exist until the programmer creates it.
Remember: OCM

A
Known as an instance of a class and does not exist until the programmer creates it.
	Remember: OCM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 3 most common techniques of OOP?

A
  1. Encapsulation: conceals the functional details of a class
    a. Includes data and functions- ensures objects integrity
  2. Inheritance: child class inherits attributes and behaviors from an existing parent class. New class is subclass.
  3. Polymorphism: allows programmer to treat derived class members (child classes) just like their parents. Allows modification to achieve different result.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define: Dot Notation

A

Provides a means to access the data and methods of an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define: Program

A

series of instructions a computer follows to achieve a goal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define: Program Flow

A

Flow of execution. Process of how a program executes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 3 structural components of computer programs?

A
  1. Sequential Action  Linear progression of tasks
  2. Branches  Selection of different courses of action
  3. Loops  Repetition structure that can potentially process the same sequence of statements multiple times.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define: Pseudocode

A

Structured, natural language to abstract the technical details and programming syntax away from the reader.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe an IF statement:

A
  • Evaluates a Boolean condition and executes statements only if the resulting condition is true.
  • Only the first IF statement is necessary, the ELSE IF and ELSE are optional and only when logic dictates that more than one action may be necessary for a given condition.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe a WHILE LOOP:

A
  • Checks a Boolean expression before it loops; if true, it executes.
  • Cycle continues until Boolean condition becomes false.
17
Q

Describe a FOR and FOREACH LOOP:

A
  • Also referred to as a counting loop

* For each are another repetition structure for traversing items in a collection.

18
Q

Define NESTING:

A
  • Method of using loops within one another.

* Indentation of nested constructs clearly shows the flow of execution.

19
Q

FLOWCHARTS

A
  • Terminal - beginning or end of a program
  • Process - Action to be executed
  • Input/Output - Aquire data from a user or display data to a user.
  • Decision - Branch based on a Boolean decision
  • Predefined Process - formally defined process, function, or subroutine that is defined elsewhere
  • Flowline - Direction of program flow
20
Q

Stages of compilation

A
  1. Pre-processor – source code into logical file
  2. Compilation – logical file then goes through conversion process to generate assembly language
  3. Assembly – the assembly code from the previous stage runs through another conversion process to generate Object code (machine code)
  4. Linking – takes the object code and links together any third party libraries of pre-written code producing an executable file.