This is an android based basic expense manager application which will be used as a lab assignment for CS3042 - Database Systems course module.
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.
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.
- Fork the GitHub project - https://github.com/GayashanNA/SimpleExpenseManager
- Clone your fork of the above project into your android studio IDE.
- Implement the two interfaces
- Extend and implement the
setup()
method of the abstract classExpenseManager
. - 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 ***/
- Commit your code and push to your forked repository in GitHub.
- Download your project as a Zip from GitHub and submit as the completed assignment.