Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
17.2.1. Events
This section
Practice test
10 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
3 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is an event?
Hint
Think of an example of something that may happen in a program.
- 2.
What does an event listener do?
Hint
What happens when you click a button in an app?
- 3.
What is an event in programming?
- A command line input
- An action or occurrence
- A code error
Hint
Think about what triggers a response in a program.
- 4.
True or False: An event source is the component that generates an event.
- True
- False
Hint
Recall what generates events in your applications.
- 5.
Design a simple interactive GUI that has multiple buttons triggering different actions.
Hint
Consider how each button acts as an event source.
- 6.
You have a program that processes keyboard events. Discuss how the program could manage multiple key presses for a game controller.
Hint
Think about how games respond to potentially simultaneous key presses.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
Get your answers marked and your progress tracked
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting