To correctly pair an example with event-driven or sequential-driven programming, we need to understand the definitions:
-
Event-Driven Programming: This type of programming is based on responding to user actions or events (like clicks, key presses, etc.). An example would be a music application where the users create playlists based on actions they take, such as selecting songs.
-
Sequential-Driven Programming: This type follows a set sequence of operations or steps, where the flow of execution is determined by the order of statements in the program. A shopping list application where users add and remove items in a specific step-by-step process could exemplify this.
Based on the definitions, the best option is:
- Event-Driven Programming – a music application that allows users to create playlists.
- Sequential-Driven Programming – a shopping list application that users can add and remove items from.
So the correct response is: event-driven programming – a music application that allows users to create playlists and sequential-driven programming – a shopping list application that users can add and remove items from.
This option accurately reflects the nature of both programming styles.