SLR3 Programming paradigms Flashcards
Procedural languages
“Any high-level language in which program statements can be grouped in self-contained blocks called procedures and functions. These procedures have their own variables, not accessible outside the procedure.”
Object-Oriented Programming
“A method of programming which classifies real-world objects and encapsulates those objects’ attributes and behaviours.”
Hierarchy chart
“A diagram which looks like an upside-down tree, with one node at the top (root) and many below. It is used when designing solutions to problems to help break a large problem down into several small parts.”
Structured approach
“A logical approach taken to breaking down a large program so that it is easier to understand and solve. Quite often, this involves creating a top-down modular design of a problem using a process known as step-wise refinement.”
Class
“A type definition of an object.”
Object
“An instance of a class.”
Instantiation
“The process of creating an actual named instance of a class. The instantiated named copy of the class is an object of that class.”
Encapsulation
“All the object’s attributes are contained and hidden in the object, and access to them is restricted to operations of that class.”
Inheritance
“When a derived class is defined, it also has all the attributes and methods of the base class.”
Aggregation
“A weak ‘has a’ relationship, if the container object is destroyed, the object(s) contained within will continue to exist.”
Composition
“A strong ‘has a’ relationship, if the container object is destroyed, the object(s) contained within are also destroyed”
Polymorphism
“A specialised form of overloading which allows us to create very general object structures, which can be used with a wide range of data types.”
Overriding
“A method in a subclass or derived class which has the same name as a method in one or more of its superclasses. The method supersedes all other versions of the method above it in the inheritance tree.”
Encapsulation
“All the object’s attributes are contained and hidden in the object, and access to them is restricted to operations of that class.”
Class diagram
“A diagram from the Unified Modelling Language (UML) which describes the structure of a class, its attributes, methods, etc.”