Starting from:
$30

$24

Lab 6 Tide Table with a SQLite Database Solution

Objectives: This lab is designed to give you practice:




Working with SQLite databases o Creating tables



o Inserting data o Querying data




Using a SimpleCursorAdapter for a ListView



Part 1: Do the textbook exercises shown below:




13-1, Review the Task List app and use its database class
13-2, Use the SQLite Database Browser
13-3, Modify the database class for the Task List app



Upload a text file to Canvas in which you will report, for each exercise above, whether you:




Followed all the steps shown in the book and successfully compiled and ran the program (where applicable).
Loaded the completed solution, experimented with the code, and ran the program (where applicable).
Read through the steps and inspected the relevant code without writing or running a program.
Didn’t do any of the above.


Part 2: Tide Table v2




Requirements




Modify the Tide Prediction application from the previous version so that users can:




Pick a location, from a list of at least three locations, for tide predictions.



Select a date and see at least one day’s high and low tides starting at midnight on the selected date.
The tide chart will be shown on a second screen.



The annual tide predictions for each location will be pre-loaded into the application.



First Activity




Florence

Newport Spinner




Astoria




May 10, 2016

May 11, 2016 Date Picker




May 12, 2016




Show Tides
Button



(The spinner and date picker are optional. You can use EditText widgets instead)







Implementation




Second Activity




ListView

Date Day Time Height

05/11 Wed 03:56 AM 7.02 H






05/11


Wed




10:52 AM
-0.73 L
























05/11


Wed




05:39 PM
5.96 H






















05/11


Wed




11:05 PM


2.72 L






















05/12


Thu




04:53 AM
6.37 H








































05/12


Thu




11:48 AM
-0.18 L








































05/12


Thu




06:39 PM
5.85 H













































(The information shown above is required, but the layout and format are optional)



Use an SQLite database file instead of a text file to provide tide information for the ListView in your app. Your app’s database will have one table containing all the annual tide prediction information for all the tide stations.




Use the code from the previous lab to load tide data from at least three XML files into a SQLite database. The database can be loaded with tide data when the app starts. Use tide information that you have downloaded from: http://tidesandcurrents.noaa.gov/tide_predictions.html?gid=1409



Use the xml annual tide prediction files.




Date and time will be stored in separate fields in the database table.



Put the XML files in the assets folder for your project so that it will be deployed to the device with the app (as part of the apk).
The location and date-time selected in the first activity will be sent to the second activity in an intent. In the second activity, the database will be queried to get the tide prediction data that will be displayed in the ListView. Show two days worth of tide information, starting with the date selected.



Submission




Zip the project and upload it to Canvas.

More products