Principles of Programming Flashcards
Object Oriented
Programming
A style of programming in which programmers define classes that consist of attributes (data) AND operations (functions/methods)
Class
Blueprint for an object. A class defines how an object is to behave (methods) and what data is to be stored (attributes/variables)
Object
An instance of a class
Access modifier
Keywords in object-oriented languages that set the accessibility of attributes and methods. E.g. private, public, protected or static.
Procedural
Instructions are in programmer defined sequence. Used for a general application like payroll. Eg. Visual Basic, C, PHP
Event-driven
The flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs
Visual
Users create programs by manipulating program elements graphically rather than by specifying them textually.
Used when writing applications that require GUI or for visual environments like Windows
Markup
language
Uses tags to define elements within a document. It is human-readable, meaning markup files contain standard words, rather than typical programming syntax.
Used creating web pages
Low-level
language
Machine code and assembly languages, instructions reflect the way the machine is built; good for driving printers, creating displays and translators. Not good for problem solving
High-level
language
Programmer can express the program in a way that reflects the problem, allows meaningful identifier names and use of subroutines.
Paradigm
A typical style of programming approach used to structure a program in a particular way.
Encapsulation
Combining data and methods into one class. Data in the class is accessed using predefined methods and parameters. The implementation (code) of an object is hidden from the rest of the program.
Inheritance
Class used to build a hierarchy of descendant classes with each descendant class has access to data and methods from its parent class
Polymorphism
Giving an action/method one name that is shared up and down the class hierarchy. Each class implements (codes) the action (method) in a way that is appropriate to itself.
Data type
An attribute that tells what kind of data is to be held in a data item or variable e.g. integer, string, single