Chapter 20. Further programming Flashcards
(50 cards)
What is a programming paradigm?
A set of programming concepts and methodologies used to write and structure code.
What is low-level programming?
Programming that uses the computer’s basic instruction set, such as assembly or machine code.
What is imperative programming?
A paradigm where the program’s logic is expressed through statements that change a program’s state step by step.
What is object-oriented programming (OOP)?
A programming methodology using self-contained objects containing data and methods to model real-world entities.
What is declarative programming?
A style of programming that expresses the logic of computation without describing its control flow; based on facts and rules.
What is a class in OOP?
A template that defines the methods and attributes for objects of a certain type.
What is encapsulation?
The process of bundling data and methods into a single unit, a class.
What is an object?
An instance of a class that includes data and methods.
What are attributes in a class?
The data items that define the state of an object.
What is a method in OOP?
A procedure or function that operates on the attributes of an object.
What is data hiding?
A technique where attributes are kept private and only accessible through public methods, ensuring integrity of the data.
What is inheritance in OOP?
The process by which a class (subclass) derives properties and methods from another class (superclass).
What is polymorphism?
An OOP feature that allows a method to behave differently depending on the object calling it.
What is method overloading?
Defining multiple methods with the same name but different parameters within a class.
What is containment (aggregation)?
A relationship where one class contains objects of other classes.
What is a constructor?
A method used to initialise new objects when an instance of a class is created.
What is a destructor?
A method automatically invoked when an object is destroyed to free resources.
What is a getter method?
A method used to retrieve the value of an attribute.
What is a setter method?
A method used to modify the value of a private attribute.
What is a fact in declarative programming?
A statement representing a basic piece of information known to be true.
What is a rule in declarative programming?
A logical relationship that connects facts to derive new information or conclusions.
What is exception handling?
Responding to and managing unexpected events (exceptions) that disrupt normal program execution.
What is a file in programming?
A collection of data stored on disk that can be read from or written to by a program.
What is the ‘Read’ file access mode?
Opens a file for reading data without modifying its content.