Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

CST2335 Lab 5 CST2335 Lab 5 This assignment relates to the following Course Learning Requirements: · CLR 1: Write a graphical user interface-based program, given design documents. Techniques used will...

1 answer below »

        CST2335 Lab 5
CST2335 Lab 5
This assignment relates to the following Course Learning Requirements:
· CLR 1: Write a graphical user interface-based program, given design documents. Techniques used will be object-oriented programming, structured programming, top-down coding, and event-driven coding.
· CLR 4: Debug program problems using manual and programmatic methods.
· CLR 5: Modify an existing program according to program specifications.
· CLR 6: Access and modify a database table from within the graphical user interface. Create a layered application (Presentation, Business, and Data access layers). Use a Data Access layer to provide data access to an application
· CLR 7: Create GUI programs that support internationalization as well as sustainability.
Objective of this Assignment:
The following is an exercise to help you implement what you have learned in this module. It will allow you to familiarize yourself with the module content as well as practice the skills required to develop software in the Android Studio. The specific goal of this lab is familiarize yourself with SQLite databases in Android. You will learn how to create, open, upgrade a database, as well as insert and query data.
Pre-Assignment Instructions:
1. Review the Module 5 content in Brightspace.
Assignment Tasks:
1. Create a new
anch in Git. Start by selecting the “Git” menu in Android Studio and select “Branches”. In the resulting dialog click “New
anch” and call it “lab_5”. This lab will build on lab 4 in order to save our todo list to an SQLite DB.
2. Create a class that extends SQLiteOpenHelper to create/upgrade your database. Ensure you use static variables for all column names, database name, and database version.
3. When a user opens the app, it should load all of the todos they have previously saved from the database.
4. When the user presses the ‘Add’ button, the todo should be added to the database as well as the list of todo items from lab 4.
5. Modify the onItemLongClickHandler() in the ListView so it also deletes the message from the database.
6. Write a function called printCursor(Cursor c). This function will be used for debug purposes and should print the following info to the Log window every time the main activity is loaded:
a. The database version number using db.getVersion for the version number.
. The number of columns in the cursor.
c. The names of the columns in the cursor.
d. The number of results in the cursor.
e. Each row of results in the cursor.
7. Ensure that all the labels and buttons in your app use the strings.xml files and are localized properly in both English and French. Use Google Translate to get the French translations of your English buttons if needed.
Here’s a full recording of how the app should function (the flash is from closing and re-opening the app)
Ru
ic
    Criteria
    Points
    The app compiles and runs without crashing
    2
    The todos are loaded from the database when the app launches
    2
    Adding a new todo saves in the DB
    2
    Deleting a todo deletes it from the DB
    1
    Cursor information is shown in logcat window
    2
    All items/labels are translated into French
    1
    Total
    10
Answered Same Day Feb 17, 2022

Solution

Gaurav answered on Feb 18 2022
112 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Submit New Assignment

Copy and Paste Your Assignment Here