In this test, you have to develop a mobile app. You are already given the
controller (MainActivity
class). Do not make any changes
to the controller. You have to implement the model and the view. More details
are provided below.
Create a view that looks as follows.
In particular, the view contains two radio buttons. These buttons are alligned horizontally and labelled this and that. Initially, the this button is selected. The two buttons are in the middle of the screen (centered both horizontally and vertically). Whenever a radio button is selected/clicked, the press method should be invoked.
Implement the Counter
class. Its API can be found
here.
Do not change the name of the class. Also, do not change the signatures
(name and parameters) of any of its methods.
The controller has already been implemented in the MainActivity
class.
When the controller is initialized, a Counter
object (a model) is created.
Whenever a radio button is selected/clicked, the press
method is executed.
In this method, the counter is incremented. Also, the background colour of both radio buttons
is set to red once the limit has been reached.
Before 16:45, submit your code as follows.
You can repeat the above steps as many times as you like throughout the test; every submission overwrites the previous one. Submission of a file does not imply that you can't continue to work on the file and resubmit it.
If you submit after 16:45 but before 16:50, you will get a penalty of 1 point per minute (the test is worth 15 points).