Overview

You are to write an application that uses a database to store information. The application should function as a list-making tool, i.e., something like a to-do list or grocery list builder where the user can add a bunch of tasks that need to be completed during the day or items that need to be purchased at a grocery store.

The type of information that the database holds is up to you. If you do not like the idea of a to-do or grocery list, you can use your own idea. Just make sure that it is some type of list with activities that can be completed. An example might be a list of school work to complete or a list of exercises you want to do at the gym.

Design and Functionality

The application should start with a simple splash screen that displays an image and some type of title for the application.

The main screen of the application should display the current contents of the database. If the database is empty, then nothing will display on the screen or maybe just a simple title like Your List: will appear. If the database is holding information, then a simple title like Your List: will be followed by a display of all the information in the database.

When the information is displayed, it should include a CheckBox and description for each item. If the task has been completed, the CheckBox should have a check. If the task has not been completed, the CheckBox should be empty.

The display can be done with a ListView, by using a ScrollView with a vertical LinearLayout, or however you decide to implement it.

The functionality for the database should be presented in a menu. At a minimum, the menu should have items to insert into the database, delete from the database, and start over with a new list of items.

When the insert menu option is selected, the user should be presented with a screen that contains, at a minimum, an EditText where the user can enter information (the task to be completed or the grocery item to buy), a Button that will add the item to the database, a Button that will return to the main screen, and a listing of the items that are currently in the database. The listing of items that are currently in the database should be updated with the newest addition to the database every time the Button that adds items to the database is clicked.

When the delete menu option is selected, the user should be presented with a screen with a listing of all the items that are in the database. Each item should be displayed with a RadioButton along with the description for the item. When the user selects an item, it should be deleted from the database and the listing on the screen should be immediately updated.

When the start over with a new list of items menu option is selected, all the items in the database should be deleted and the listing on the main screen should be cleared of any information.

If you do choose to add more items to the menu, make sure their functionality is thoroughly documented in your code. The database should be implemented as a separate class. The methods that are part of the class are left up to you, but you must have methods to do the following given the names provided:

  • insertItem() - Insert an item, which is passed in as an argument
  • retrieveItems() - Retrieve all the items in the database
  • updateItem() - Update an item in the database
  • deleteItem() - Delete an item by id number
  • deleteAll() - Delete all the items in the database

How the information is stored is left up to you but it would probably be useful to create a class to represent a single item that will be added to the database. It should probably hold the unique id number for the database, the description of the task to be completed (or item to be bought), and whether the task has been completed (or item has been bought). It would also probably be helpful to have a complete set of setters and getters for the data members.

Requirements/Notes

1. The SQLiteDatabase class contains a method named delete() that can be used to delete all of the information in a table in the database.

2. When setting up the project, use the same naming convention we have used before.

3. Make sure you use a good solid Model-View-Controller design for your app.

The code that is submitted must be thoroughly documented. All TextBoxes, Buttons, or any other component that the Java code interacts with must have a descriptive name. The TextViews for labels can be left with the default names assigned by Android Studio.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.