1.2.4 - Types of Programming Language Flashcards
What is a programming paradigm?
Different approaches to using a programming language to solve a problem.
What are the two broad categories of programming paradigms?
Imperative and declarative.
What are two examples of the imperative programming paradigm?
Procedural and object-oriented.
What are two examples of the declarative programming paradigm?
Functional and logic.
What is the main feature of the imperative programming paradigm?
A paradigm that uses code that specifies the actions to be performed to solve the problem.
What is the procedural programming paradigm?
A paradigm that uses a sequence of instructions which may be contained within procedures.
What is an example programming language that follows the procedural paradigm?
Pascal, python, logo.
What is object-oriented programming?
OOP is built on entities called objects which are formed from classes that have certain attributes and methods.
What is an example programming language that follows the object-oriented paradigm?
Python, Delphi, Java, C#.
What is the main feature of the declarative programming paradigm?
The desired result is stated rather than the instructions that need to be performed. It is the job of the programming language to determine how to obtain the result.
What is the definition of the functional paradigm?
It uses the concept of reusing a set of functions that form the core of the program.
What is an example programming language that follows the functional paradigm?
Haskell, C#, Java.
What is the definition of the logic paradigm?
Uses code which defines a set of facts and rules based on the problem. Queries are used to find solutions.
What is an example programming language that follows the logic paradigm?
Prolog, SQL.
What is assembly language?
Assembly language is the next level up from machine code and uses mnemonics rather than binary.
What does the assembly instruction ADD mean and do?
Add - Adds the value at the given memory address to the value in the accumulator.
What does the assembly instruction SUB mean and do?
Subtract - Subtracts the value at the given memory address from the value in the accumulator.
What does the assembly instruction STA mean and do?
Store - Stores the value in the accumulator at a given memory address.