Design an Android application for the Department of Tourism called SATourismApp. The application must have a GUI. The application must make use of the SQLite Database to store and retrieve details of the tourist attractions. The app must consist of the following activities/classes: Main activity: This is the main user interface of the application. PlaceDetails class: This will handle the details of the tourist attractions. SQLite Helper class: This will handle the database and tables creation and also performing the CRUD operations. SQLite Helper class For this task you are only going to perform CR (Create & Read) operations. Create an SQLite database called satourist. Your database should have a table called touristattractions to store details of the tourist destinations found in the nine provinces of South Africa. provides the provinces and the tourist attractions you need to add to your database. Make use of an addPlaces() method to add the tourist attractions to the database. The database should have a getPlaceDetails() method which gets specific tourist attractions details that were requested from the Spinner. Note that the Main Activity will need this method. Make use of the Cursor implementation that exposes results from a query on a SQLiteDatabase. Main Activity: It should be spinner widget which must be populated with the nine provinces of South Africa. When a particular province is selected, the application must display the tourist attraction for that province from the database to a TextView widget. Hint: make use of the onItemSelectedListener to listen to changes to the spinner. Place Details class It must consist of a constructor and getter methods to get details of a particular place requested for
Design an Android application for the Department of Tourism called SATourismApp. The application must have a GUI.
The application must make use of the SQLite
The app must consist of the following activities/classes:
-
Main activity: This is the main user interface of the application.
-
PlaceDetails class: This will handle the details of the tourist attractions.
SQLite Helper class: This will handle the database and tables creation and also performing the CRUD operations.
SQLite Helper class
For this task you are only going to perform CR (Create & Read) operations. Create an SQLite database called satourist.
-
Your database should have a table called touristattractions to store details of the tourist
destinations found in the nine provinces of South Africa. provides the provinces and the tourist attractions you need to add to your database. Make use of an addPlaces() method to add the tourist attractions to the database.
-
The database should have a getPlaceDetails() method which gets specific tourist attractions details that were requested from the Spinner. Note that the Main Activity will need this method. Make use of the Cursor implementation that exposes results from a query on a SQLiteDatabase.
Main Activity:
-
It should be spinner widget which must be populated with the nine provinces of South Africa.
-
When a particular province is selected, the application must display the tourist attraction for that province from the database to a TextView widget. Hint: make use of the onItemSelectedListener to listen to changes to the spinner.
Place Details class
- It must consist of a constructor and getter methods to get details of a particular place requested for.
Step by step
Solved in 7 steps