Programming Languages

Cards (49)

  • What are programming paradigms?
    Different approaches to using programming languages
  • What are the two broad categories of programming paradigms?
    Imperative and declarative
  • What does the choice of programming paradigm depend on?
    The type of problem that needs solving
  • What does imperative programming specify?
    Actions to be performed clearly
  • Why is procedural programming widely used?
    It applies to many problems and is easy
  • What is a characteristic of procedural programming?
    Uses a sequence of instructions
  • How are instructions executed in procedural programming?
    In a step-by-step manner
  • What is object-oriented programming (OOP) focused on?
    Reusable components with similar characteristics
  • What are the entities in OOP called?
    Objects formed from classes
  • What do classes in OOP have?
    Attributes and methods
  • What is the purpose of OOP?
    To create reusable and maintainable programs
  • What is the focus of declarative programming?
    Stating the desired result
  • How does functional programming operate?
    By reusing a set of functions
  • What do logic languages define in declarative programming?
    A set of facts and rules
  • What is a key advantage of procedural programming?
    Simple to implement for many problems
  • What traditional data types do procedural languages use?
    Integers and strings
  • What are the four main programming structures in structured programming?
    Sequence, selection, iteration, recursion
  • How does sequence control flow work?
    Code is executed line-by-line
  • What does selection control flow use?
    IF statements for specific conditions
  • What is iteration in programming?
    Executing code a certain number of times
  • What is recursion in programming?
    Functions expressed in terms of themselves
  • What is assembly language?
    Next level up from machine code
  • How is assembly language converted to machine code?
    Using an assembler
  • What makes assembly language easier to use than machine code?
    It uses mnemonics instead of binary
  • What is the relationship between assembly language and the CPU?
    Commands are processor-specific
  • What does each mnemonic in assembly language represent?
    A numeric code
  • What is the purpose of the opcode in machine code instructions?
    Specifies the instruction to be performed
  • What do addressing modes allow in machine code?
    Access to more data storage locations
  • What is immediate addressing?
    Operand is the actual value in binary
  • What is direct addressing?
    Operand gives the address holding the value
  • What is indirect addressing?
    Operand gives address of a register holding another address
  • What is indexed addressing?
    Uses an index register to determine address
  • What is a class in object-oriented programming?
    A template for an object
  • What defines the state of an object in OOP?
    Attributes that give properties
  • What is the purpose of a constructor method in OOP?
    To create a new object
  • What is encapsulation in OOP?
    Protecting attributes from direct access
  • What is a setter in OOP?
    A method that sets an attribute's value
  • What is a getter in OOP?
    A method that retrieves an attribute's value
  • What is inheritance in OOP?
    A class can inherit from another class
  • What is polymorphism in OOP?
    Objects behave differently based on their class