Due Tuesday, 2/18/14, 11:59pm
Note the Tuesday due date because of the Monday holiday.
For this assignment, you will create an app that allows the user to select an appliance and enter the number of hours per day the appliance is used. The app will calculate and display the daily operating cost and the BTUs used by the appliance. Your app must have the following elements:
- (10 points) Use a ListPicker to allow the user to select an appliance. Provide at least four choices and consult http://visualization.geblogs.com/visualization/appliances/ to find out the power draw of each appliance.
- (10 points) Use the following global variables:
- a list of appliances
- a list of the watts consumed by each appliance - the order of the appliances and the order of the watts should match in the appliance list and the watts list
- a number containing the cost of energy per kWh
- (10 points) Use labels, textboxes, and buttons appropriately to allow the user to enter information (hours of use), display information (selected appliance, calculated cost, calculated BTUs), and tell the app to calculate information (using a button). My UI is show below. You should be prettier than mine, but contain the following:
- a label to prompt for hours of daily use
- a text box to allow the user to input hours of daily use
- a button to trigger calculation
- a label to show the daily cost
- a label to show the BTUs
- a label to show error messages
- (5 points) Use layouts appropriately to make your app look nice. Bonus, use images!
- (5 points) Use local variables where appropriate.
- (5 points) Show the user an error message if she tries to calculate without entering the number of hours used per day or without selecting an appliance.
- (5 points) Include all required elements on the app page!
- (1 point EXTRA CREDIT) Customize your error messages so that you provide one message if an appliance is not selected and a different message if the daily hours of use is not entered.
- (3 points EXTRA CREDIT) Add a slider to allow the user to enter hours of daily use by dragging the slider left or right.
If you are having a hard time getting started, first implement the Tip Calculator and make sure you understand all of the blocks used for the program.