0% found this document useful (0 votes)
15 views

Assignment 4 - Data Management

Uploaded by

mqwe3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Assignment 4 - Data Management

Uploaded by

mqwe3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CMPS 312 Mobile App Development

QuickMart App
Lab Assignment 4
Deadline – Thursday, November 28, 2024 11:59PM

Objective
The objective of this assignment is to practice read/write to SQLite database using Floor library.

Preparation
1. Sync the Lab GitHub repo and copy the Assignment/Assignment4 folder into your repository.
2. Open the project QuickMart App in VS Code. The project has the baseline code of the previous
assignment.
3. Providers, Navigation, and Widgets has already been implemented for you. Your task is to
implement the missing code for reading/writing to SQLite database.

Overview
The app should allow users to edit, update, delete, filter products, cart items, and favorite items. The app
should manage the data using SQLite database.

Figure 1 QuixkMart App


Implementation Instructions
1. Create the required Entity classes as illustrated in the figure 2 below, including any missing
ones from the provided base solution. Ensure that you implement cascade delete and update
functionality while enforcing data integrity using foreign keys.

1
Figure 2 : QMart Entity Relationship Diagram

2. Create Data Access Objects (DAO) and the Database classes.


3. Inside the DAO create all the necessary methods and annotations that allow the user to do all
the CRUD operations required for the app to work, such as filter products by category , add
product to cart item, add product to favorites, delete from favorites, change rating of a product,
etc.
4. Implement the QuickMart Repository with all necessary methods.
5. Change the Providers to use he the QuickMart Repository methods.
Important
• Ensure that all queries are performed by the database, e.g., do NOT read all the products data
then then filter / find products using Dart code but rather use query to return only the data
needed.
• Each student is expected to have a unique app that accomplishes the assigned tasks.
• You are free to use any theme, font, color, or icons of your choice.
• Feel free to reuse code from your previous assignments.
• Discussions with colleagues are allowed, but the use of AI tools and sharing your code is
strictly prohibited. Plagiarism will result in zero grades for all parties involved.

Submit the completed Testing Sheet as well as the code under


“your_repository/assignments/assignment4”

You might also like