182k views
5 votes
Which of the following correctly pairs an example with event- or sequential-driven programming?

a) Object-oriented programming - Database management
b) Procedural programming - Data flow
c) Functional programming - Artificial intelligence
d) Imperative programming - User interface

1 Answer

2 votes

Final answer:

The correct answer to the question is (d) Imperative programming - User interface, as imperative programming is a paradigm where program flow is driven by events, which suits user interface programming.

Step-by-step explanation:

The question asks about pairing examples with the correct type of programming paradigm, specifically focusing on event- or sequential-driven programming. The correct pair is:

Imperative programming - User interface

Event-driven or sequential-driven programming is a paradigm where the flow of the program is determined by events such as user actions, sensor outputs, or message passing from other programs. Imperative programming, which includes procedural programming, is a programming paradigm that is characterized by a sequence of statements that change a program state. This fits well with the user interface, as UI programming often involves responding to user events, such as clicks and inputs, to execute subsequent code.

Therefore, the correct answer is (d) Imperative programming - User interface.

User Tomsseisums
by
7.5k points