Procedural and OOP concepts Flashcards
procedural programming
style of programming in which operations are executed sequentially
variable
a memory location defined by the data it holds and referenced in subsequent code by the name assigned to the data
procedure (module/method/functions/subroutines)
unit of logic comprised of one or more operations
OOP
Object oriented programming; focus on generation of objects from classes to be manipulated by applications
class
blue print or general archetype from which an object is derived; the group of objects that defined by common archetypal properties
- either predefined in language or user generated
- potential attributes and behaviors that an object belonging to it can have
object
specific instance of a class
computer simulation
OOP application that attempts to mimic reality
GUI
Graphical User Interface; allows user interaction with an application by way of graphical interface
3 components of OOP
- classes
- objects
- applications of objects
3 concepts of OOP
- encapsulation
- inheritance
- polymorphism
class definition
establishes the attributes and behaviors that objects grouped within it can have
attributes
properties an instantiation can potentially have defined by a block of code in a class definition
object
specific instance of a class
instantiation
the process of generating a specific instance of a class
(object’s) state
the collection of specific values of the properties of a given object - differentiate objects a class from one another
class convention
first letter capitalized
methods
behaviors (procedures) an instantiation can potentially have defined by a block of code in a class definition
encapsulation
- characteristic of OOP that allows you to treat a collection of attributes and methods as a single entity (being referred to as an object)
- also refers to the concealment of an objects attributes and methods from use/manipulations by outside sources
inherentence
- characteristic of OOP that allows parent/child or subset/superset hierarchical relationships between classes
- child classes will have common characteristics when they are part of the same parent class
polymorphism
- “many forms”
- allows for the use of the same term to have different definitions
- valuable in application of the same behavior for different classes (“turn” method method would have different method for a car than a boat)