A basic console application for creating and tracking occurrences of habits.
Below are the design requirements provided for the project. Itemse with the strikethrough font were not implemented in the current version.
- Habits can't be tracked by time, only by quantity
- Users need to be able to input the date of the occurrence of the habit
- The application should store and retrieve data from a real database
- Creates a sqlite database with relevant tables on startup, if one isn’t present.
- The users should be able to insert, delete, update and view their logged habit.
- Application should never crash.
- You can only interact with the database using ADO.NET.
- Follow the DRY Principle, and avoid code repetition.
- Project must contain a Read Me file
(Optional) Use parameteized queries- (Optional) Allow user to create a new habit
- (Optional) Generate seed data for database
- (Optional) Create reports
- Self-generating SQLite DB
- Console UI with user input via keyboard
- Basic CRUD
- Individuals view each habit
- Select report date range or enter custom
- habitTrack.jzhartman - Main console application project
- HabitTrackerLibrary - Library with data access and models
Running the application opens a console window displaying the following data:
- Application name/version number
- List of all habits in current databasee
- Main menu with detailed selection options
From here, the user can enter the menu item number to select their desired function.
This menu item allows the user to select one of the habits displayed in the list. Once selected, the complete list of records will be printed to the console. They are then given the option to add, change, or delete any given record. Additionaly, a report can be generated for that habit that provides detailed information based on a selected date range. Allows the user to enter a new habit to track. Habit name must be unique and cannot be blank. Once the habit name is entered, the user must determine the unit of measure. They can select from a printed list of existing units, or enter a new unit.Once the habit name and unit are selected, the user can confirm the addition of the new habit. An affirmative answer will add that habit to the database.
This allows the user to delete a habit from the Habit Tracker. Doing so will also delete all records associated with that record. This is non-reversible and requires a user confirmation to complete.Below is a list of future additions that could be used to improve the current application.
- Implement optional parameterized queries feature for sqlite
- Create escape sequence for user during data input