Skip to content

This is an android based basic expense manager application which will be used as a lab assignment for CS3042 - Database Systems course module.

Notifications You must be signed in to change notification settings

DilshanSenarath/SimpleExpenseManager

 
 

Repository files navigation

SimpleExpenseManager

This is an android based basic expense manager application which will be used as a lab assignment for CS3042 - Database Systems course module.

Description

During this assignment we will be self-learning how to use an embedded database in an android application. This project is an android application that act as a skeleton. Following is the structure of the application.

Project Structure

The current implementation is non-persistent. Therefore all the account information and transactions are stored in the memory and once the application is closed, the information is lost.

Your task is to make the storage of account information and transactions persistent, using an embedded database such as SQLite as the persistent storage.

In order to achieve this you should implement the two interfaces, AccountDAO and TransactionDAO. These two interfaces follow the “Data Access Object” Design pattern 1 2. You can refer the current In-Memory implementation (InMemoryAccountDAO, InMemoryTransactionDAO) to get an idea of the current implementation.

After you have implemented the two interfaces, you can use these implementations to setup the application to use the persistent storage instead of the existing in-memory storage. In order to do that you should implement the setup() method of the abstract class ExpenseManager. You can refer the current concrete implementation (InMemoryDemoExpenseManager) of this class to get an idea.

After you have completed implementation of the ExpenseManager class, go to MainActivity class in the ui package and change the existing implementation to your implementation.

eg:

Current implementation

/***  Begin generating dummy data for In-Memory implementation  ***/
expenseManager = new InMemoryDemoExpenseManager();
/*** END ***/

Your implementation

/***  Setup the persistent storage implementation  ***/
expenseManager = new PersistentExpenseManager(context);
/*** END ***/

You can make improvements to the project as you require. However this project is designed to act as a skeleton and minimize involvement in other components such as the UI. Therefore your main effort should be focused on implementing the persistent storage using an embedded database.

Instructions

  1. Fork the GitHub project - https://github.com/GayashanNA/SimpleExpenseManager
  2. Clone your fork of the above project into your android studio IDE.
  3. Implement the two interfaces
  1. Extend and implement the setup() method of the abstract class ExpenseManager.
  2. Change current implementation to your implementation in the MainActivity ui class.

Current implementation

/***  Begin generating dummy data for In-Memory implementation  ***/
expenseManager = new InMemoryDemoExpenseManager();
/*** END ***/

Your implementation

/***  Setup the persistent storage implementation  ***/
expenseManager = new PersistentExpenseManager(context);
/*** END ***/
  1. Commit your code and push to your forked repository in GitHub.
  2. Download your project as a Zip from GitHub and submit as the completed assignment.

About

This is an android based basic expense manager application which will be used as a lab assignment for CS3042 - Database Systems course module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%