Lab 3: Potato Calorie Count (source: https://www.verywell.com/how-many-calories-in-a-baked-potato-2506867)
Design an app that allows the user to determine the number of calories in a baked potato. The app should have an EditText in which the
the user can enter the size of the potato (between 5 and 12 ounces). Next the app should have a set of Radio Buttons by which the user
can select one for the toppings. The app should also have a Button, and TextView for displaying the answer (number of calories). When
the user clicks the button, determine the size of and topping on the potato and display the corresponding number of calories. Check that
the potato size falls in the range from 5 to 12. There are 25 calories for each ounce in a potato. The possible toppings are:
(Nothing, Butter, Sour Cream, Chili) which correspond to additional calories of (0, 100, 60, 75) respectively. If the user changes the
size of the potato or the topping, then your app should clear out the calorie count. Submit the .xml file for the layout, and
the .kt files (zipped up).
Due: Sept. 10
Thursday:
SharedClear.zip A way to write one clear method that handles multiple EditText
text-changed events.
SpinnerDemo_kotlin.zip Demos Spinners (like a drop-down list). Populates in two different ways:
1) from a code array; 2) from a resource array
Lab 4: Potato Calorie Count Revisted (source: https://www.verywell.com/how-many-calories-in-a-baked-potato-2506867)
Design an app that allows the user to determine the number of calories in a baked potato. The app should have a Spinner in which the
the user can enter the size of the potato (between 5 and 12 ounces). Next the app should have a second Spinner by which the user
can select one for the toppings. The app should also have a Button, and TextView for displaying the answer (number of calories). When
the user clicks the button, determine the size of and topping on the potato and display the corresponding number of calories. There are 25
calories for each ounce in a potato. The possible toppings are: (Nothing, Butter, Sour Cream, Chili) which correspond to additional
calories of (0, 100, 60, 75) respectively. If the user changes the size of the potato or the topping, then your app should clear out
the calorie count. Submit the .xml file for the layout, the .kt files, and if-used to populate a spinner the strings.xml (zipped up).