Solution architecture
For this list of features, we can have the following classes and relations between them to implement the requirements:
AppAudio
: Provides a simple interface for the audio functionality, consisting of the mute/unmute, Play/Pause, and volume up/down buttons. It initializes the audio sub-system and delivers audio events to its clients.AppButton
: Handles user press events on the devkit buttons and notifies any client code via an event queue.AppNav
: Keeps track of the animal list. It is the information source for the other components of the application, and it updates the current animal metadata when a user navigates by using the devkit buttons.AppUi
: Encapsulates the generated UI files and manages the application flow for user interactions, by communicating with the other classes mentioned above.
The following class diagram roughly depicts how classes relate to each other:
Figure 5.4: Class diagram
The implementation...