Day 2 Flashcards
What are the three Programming methodologies?
- Unstructured
- Procedural
- Object- oriented
Describe Unstructured programs
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
Describe Procedural Programs
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
Describe Object-Oriented Programs
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
What are the two concepts that define each item in the real world?
- Attributes- characteristics of an objects
2. Behaviors- actions (methods) an object can perform
What is a class?
- Blueprint that defines the abstract details of a thing; attributes and behaviors
- REMEMBER: CAB
What are attributes and behaviors collectively?
Members of the class
Define: Object
Known as an instance of a class and does not exist until the programmer creates it.
Remember: OCM
Known as an instance of a class and does not exist until the programmer creates it. Remember: OCM
What are the 3 most common techniques of OOP?
- Encapsulation: conceals the functional details of a class
a. Includes data and functions- ensures objects integrity - Inheritance: child class inherits attributes and behaviors from an existing parent class. New class is subclass.
- Polymorphism: allows programmer to treat derived class members (child classes) just like their parents. Allows modification to achieve different result.
Define: Dot Notation
Provides a means to access the data and methods of an object.
Define: Program
series of instructions a computer follows to achieve a goal.
Define: Program Flow
Flow of execution. Process of how a program executes.
What are the 3 structural components of computer programs?
- Sequential Action Linear progression of tasks
- Branches Selection of different courses of action
- Loops Repetition structure that can potentially process the same sequence of statements multiple times.
Define: Pseudocode
Structured, natural language to abstract the technical details and programming syntax away from the reader.
Describe an IF statement:
- 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.