Professional Documents
Culture Documents
1
• System Design: Creating a scalable and intuitive system architecture that
supports various functionalities like real-time expense logging, data
visualization, and report generation.
3
2. Theoretical Background and Definition of the Problem
Theoretical Background
1. Principles of Personal Finance Management: Central to Expense
Tracker's theoretical foundation is the concept of efficient personal
finance management. This includes budgeting, tracking expenses, and
financial planning. The application draws from financial theories that
stress the importance of being aware of one’s financial habits as a step
towards achieving financial stability and independence.
2. User Experience in Financial Applications: Emphasizing a user-centric
approach, the design principles of Expense Tracker are rooted in creating
an intuitive and accessible interface. This aligns with theories in software
design that prioritize ease of use, especially for applications dealing with
complex data like personal finances.
3. Behavioural Economics in Spending: The application incorporates
concepts from behavioural economics to help users understand and
potentially alter their spending habits. By providing insights and
visualizations of their financial activities, users are encouraged to make
more informed and reflective spending choices.
4. Data Analytics in Personal Budgeting: The application leverages data
analytics to provide users with a detailed breakdown of their spending.
This approach is based on the idea that data-driven insights can lead to
better financial decisions and more effective budget management.
5. Technology Integration in Daily Life: Recognizing the increasing role
of technology in daily life, Expense Tracker integrates seamlessly into the
user's routine, making the task of managing personal finances more
convenient and less time-consuming.
Definition of the Problem
Expense Tracker addresses several key problems in the realm of personal
finance management:
1. Inefficient Tracking and Management: Many individuals struggle with
keeping a detailed and organized record of their expenses, leading to a
lack of clarity in their financial status.
2. Overwhelming Financial Data: Without a system to categorize and
simplify financial data, users can become overwhelmed, hindering
effective budget management and financial planning.
4
3. Limited Financial Insights: Traditional methods of tracking expenses
often do not provide meaningful insights into spending habits, making it
challenging for users to identify areas where they can optimize their
spending.
4. Inaccessibility to Simplified Financial Management Tools: There is a
need for a simple yet comprehensive tool that can cater to a wide range of
users, from those who are financially savvy to those who are just
beginning to manage their personal finances.
5. Lack of Integration in Daily Life: Many existing financial tools do not
integrate well into the daily lives of users, requiring them to go out of
their routine to manage their finances.
Expense Tracker aims to solve these problems by providing an easy-to-use,
integrated, and insightful tool for managing personal finances, encouraging
better financial habits and informed decision-making.
5
3. System Analysis & Design vis-à-vis User Requirements
System Analysis
The system analysis phase for Expense Tracker was a comprehensive process
that involved evaluating the existing personal finance management systems and
identifying areas for enhancement. The analysis focused on aligning the
application with the needs of potential users and current market trends.
1. Requirement Gathering:
• Conducted in-depth research to gather requirements from potential
users, particularly individuals looking for a straightforward way to
manage their personal finances. This included conducting surveys,
interviews, and interactive sessions with people who regularly
track their expenses.
• Key areas of focus were ease of data entry, intuitive categorization
of expenses, budgeting features, and the ability to generate
insightful reports.
2. Market Research:
• Performed a thorough analysis of the current market to identify
existing solutions in personal finance management and their
limitations. This helped in understanding what features are most
valued by users and where other applications may be falling short.
• Examined emerging trends, such as mobile integration, cloud-
based data storage, and AI-driven financial insights, to ensure that
Expense Tracker remains competitive and relevant.
3. Process Mapping:
• Mapped out the typical process an individual undergoes when
managing personal finances, from recording transactions to
analysing spending patterns.
• Identified inefficiencies and common pain points in current
practices, such as the difficulty in maintaining consistent expense
records and challenges in deriving actionable insights from raw
financial data.
4. User Persona Creation:
• Developed user personas representing the target audience for
Expense Tracker. These personas encompassed a variety of
6
demographics, financial literacy levels, and personal budgeting
goals.
• Each persona highlighted specific needs and challenges, guiding
the design and functionality of the Expense Tracker to ensure it
addresses real user requirements.
5. Use Case Development:
• Developed detailed use cases to outline how potential users would
interact with Expense Tracker. These use cases spanned a range of
functionalities, including initial setup, daily expense logging,
budget creation and monitoring, report generation, and long-term
financial planning.
• Use cases were instrumental in defining the necessary features and
guiding the development process to ensure the final product aligns
with user expectations and solves real-world problems in personal
finance management.
Through this systematic analysis, Expense Tracker was conceptualized to not
only meet but exceed the expectations of individuals seeking an effective and
user-friendly tool for managing their personal finances. The insights gained
from this phase played a pivotal role in shaping the development strategy and
ensuring that the application addresses the core needs of its users.
7
was on minimizing user input effort and maximizing clarity and
accessibility of financial information.
3. Database Design:
• A comprehensive database schema was developed to store and
manage user data effectively. The design included tables for
tracking expenses, categorizing them, storing user profiles, and
managing budget information. Care was taken to ensure data
integrity, normalization, and security.
4. Feature Specification:
• Each feature of Expense Tracker was meticulously specified. This
included the functionality of the expense logging mechanism,
budget setting and monitoring tools, reporting modules, and data
visualization aspects.
5. Workflow Design:
• Workflows for key processes such as recording expenses, creating
and adjusting budgets, and generating financial reports were
carefully planned. The goal was to streamline these processes,
making them as efficient and user-friendly as possible.
6. Prototyping:
• Early prototypes of Expense Tracker were developed to provide a
tangible look and feel of the application. These prototypes were
instrumental in initial user testing and gathering feedback.
7. Feedback Incorporation:
• Feedback from potential users and other stakeholders was actively
sought and integrated into the design. This step ensured that the
application would align effectively with user needs and
expectations.
8. Compliance and Security Planning:
• The design incorporated considerations for compliance with
relevant data protection and privacy regulations. Security features
such as encryption, secure data storage, and user authentication
were key components of the design.
9. Sustainability and Eco-friendliness:
8
• In line with contemporary digital product standards, the design
included features that encourage eco-friendly practices, such as
digital receipts and reports to reduce paper use.
The system design phase for Expense Tracker was exhaustive and detailed,
focusing on creating a solution that was not only technically sound and feature-
rich but also highly user-centric and adaptable to changing user needs and
technological advancements. The goal was to deliver a personal finance
management tool that was both practical and pleasant to use, encouraging better
financial management practices among its users.
9
4. SYSTEM PLANNING
System planning for Expense Tracker involves a strategic approach to define the
project's timeline, allocate resources effectively, and set key developmental
milestones. This planning phase is essential to ensure the project's successful
execution within the defined constraints.
10
• Individuals seeking a comprehensive tool for personal finance
management.
• Users with varying levels of financial literacy, from beginners to
those well-versed in budgeting and expense tracking.
System Capabilities
• Cross-Platform Functionality: Accessible on various operating
systems, optimized for desktop use.
• Data Security and Privacy: Adherence to data protection
regulations, ensuring user data security.
• Scalability: Capability to handle an expanding user base and
evolving feature set.
• User-Friendly Interface: Intuitive and easy-to-navigate design.
• Customization: Options to personalize settings and preferences.
• Automated Alerts and Reminders: Notifications for important
financial events and milestones.
• Real-Time Data Processing: Immediate updates for expense
entries and budget changes.
2. Project Timeline and Milestones
• Phase 1: Research and Analysis (Month 1): Market research, user
requirement gathering, and system feasibility analysis.
• Phase 2: Design (Months 2-3): UI/UX design, database schema
development, and system architecture design.
• Phase 3: Development (Months 4-6): Coding of the application,
feature implementation, and initial testing.
• Phase 4: Testing and Refinement (Months 7-8): Comprehensive
testing, including unit, integration, and user acceptance testing,
followed by bug fixing and system refinement.
• Phase 5: Deployment and Launch (Month 9): Final deployment,
user documentation, and launch of the application.
• Phase 6: Post-Launch Support and Updates (Ongoing): Regular
updates, feature enhancements, and user support.
3. Resource Allocation
11
• Allocation of development team, including frontend and backend
developers, UI/UX designers, and QA testers.
• Budget planning for software tools, cloud services, and marketing
efforts.
4. Risk Management and Mitigation Strategies
• Identification of potential risks such as development delays,
security vulnerabilities, and user adoption challenges.
• Development of contingency plans and mitigation strategies for
identified risks.
Through careful system planning, Expense Tracker is positioned to be a reliable
and efficient tool for personal finance management, meeting the specific needs
of its target users and adapting to the evolving landscape of financial
management tools.
14
To complete the Expense Tracker project within an ambitious timeline of 3
months, a focused and expedited approach is essential. Below is the proposed
timeline structured to meet this goal:
Month 1: Conceptualization, Design, and Initial Development
• Weeks 1-2: Conceptualization and Design
• Conduct rapid requirement gathering and analysis.
• Perform streamlined market research to identify key features.
• Finalize the technology stack, focusing on Java, JavaFX, and
MySQL.
• Develop basic user personas and outline primary use cases.
• Sketch initial UI/UX design wireframes and system architecture.
• Set up the development environment and version control with Git.
• Weeks 3-4: Initial Development
• Begin coding core functionalities, prioritizing expense tracking and
budgeting features.
• Initial setup of the MySQL database and integration with backend.
• Start developing basic UI components based on wireframes.
Month 2: Intensive Development and Preliminary Testing
• Weeks 5-6: Continued Development
• Intensify development efforts, focusing on remaining key features.
• Backend development and database enhancements.
• Further develop and refine UI components.
• Weeks 7-8: Testing and Refinement
• Begin unit testing of individual components.
• Conduct initial integration testing.
• Address and fix identified bugs and issues.
• Start preliminary performance and security assessments.
Month 3: Final Development, Comprehensive Testing, and Deployment
• Weeks 9-10: Final Development and Enhanced Testing
15
• Complete development of all planned features.
• Undertake comprehensive testing, including User Acceptance
Testing (UAT).
• Implement refinements based on feedback and continue bug fixing.
• Prepare for deployment, including finalizing launch plans and user
documentation.
• Weeks 11-12: Deployment and Post-Launch Support
• Deploy Expense Tracker to the production environment.
• Monitor system performance and address any immediate issues.
• Conduct brief user training sessions and distribute documentation.
• Perform a post-launch review to identify any urgent fixes or
improvements.
Key Milestones
• End of Week 2: Completion of design phase and commencement of
development.
• End of Month 1: Core functionalities in place and initial testing
underway.
• End of Month 2: Completion of all primary features and advanced
testing phase.
• End of Month 3: Full deployment of Expense Tracker and execution of
post-launch activities.
This timeline is ambitious and requires diligent project management, efficient
resource utilization, and a commitment to meeting deadlines while maintaining
high standards of quality.
16
5. Risk Identification for Expense Tracker Project
Identifying potential risks is crucial for the successful completion of the
Expense Tracker project. Being aware of these risks from the outset allows for
proactive planning and mitigation strategies. Here are the primary risks that
could impact the project, including technical challenges, resource constraints,
and external factors:
1. Complexity in Application Development:
• Risk: Challenges in implementing specific features, such as user-
friendly interfaces or complex data analytics.
• Impact: Potential delays in development or compromises in
application functionality.
2. Resource Limitations:
• Risk: Insufficient team members or lack of specific technical
expertise in areas like JavaFX.
• Impact: Project delays, increased workload for team members, or
need for additional support.
3. Constrained Timeline:
• Risk: The short timeline may be challenging for thorough
development and testing.
• Impact: Possible scaling back of features or compromised
software quality.
4. Software Bugs and Quality Assurance:
• Risk: Late discovery of critical bugs or quality issues during
development.
• Impact: Last-minute fixes impacting project schedule and
potentially the deployment phase.
5. Evolving User Requirements:
• Risk: Changes in user needs or feedback leading to adjustments in
the project scope.
• Impact: Possible delays or redesign of features, affecting the
development timeline.
6. Data Security and Privacy Issues:
17
• Risk: Vulnerabilities in software security or non-compliance with
data protection standards.
• Impact: Legal complications, loss of user trust, and potential
security breaches.
7. Dependence on Specific Technologies:
• Risk: Heavy reliance on certain technologies or tools that may
become obsolete or unsupported.
• Impact: Unplanned updates or changes in technology, affecting
development progress.
8. Budgetary Constraints:
• Risk: Unexpected costs exceeding the planned budget.
• Impact: Possible need for additional funding or reduction in
project scope.
9. Market Dynamics and Competition:
• Risk: Shifts in market trends or emergence of competing
applications during the development phase.
• Impact: Impact on the application's market relevance or
competitive position at launch.
10. User Engagement and Adoption:
• Risk: Challenges in user acceptance due to factors like ease of use
or market awareness.
• Impact: Low initial user engagement, affecting the application's
overall success and value.
Addressing these risks involves careful planning, flexible project management,
and regular reassessment of strategies to ensure that Expense Tracker not only
meets its development goals but also effectively serves its intended user base.
20
6. Methodology Adopted, System Implementation
21
• User Stories and Backlog Management: Breaking down features
and requirements into user stories to be maintained in a product
backlog, continuously prioritized and refined.
• Sprint Reviews and Retrospectives: End-of-sprint reviews to
demonstrate new features, and retrospectives to reflect on the sprint
and plan improvements for subsequent ones.
4. Benefits for Expense Tracker:
• Agile methodology is well-suited for the Expense Tracker project,
offering a structured yet adaptable framework. It ensures that the
final product is closely aligned with user needs and market
dynamics and facilitates a responsive and efficient development
process.
Adopting Agile for the Expense Tracker project ensures effective handling of
the complexities and dynamics inherent in developing a personal finance
management tool. This approach enhances the project’s ability to swiftly adapt
to changes, increasing the likelihood of its success and ensuring high levels of
user satisfaction.
22
• Local instances of MySQL will be set up on each developer’s
machine for development and testing purposes.
5. Testing Tools:
• Integration of unit testing and integration testing tools within the
IDE.
• Use of test automation frameworks compatible with the Java
environment.
6. Communication Tools:
• A WhatsApp group for instant communication and daily stand-up
meetings.
• Use of email and Trello for task tracking and documentation.
Production Environment Setup
1. Server Configuration:
• Since Expense Tracker is a desktop application, the production
environment primarily focuses on database servers.
• A dedicated MySQL server with high availability and backup
solutions to ensure data integrity and security.
2. Networking and Security:
• Implementation of firewalls and intrusion detection systems to
secure the server.
• Regular security updates and patches to ensure the protection of
sensitive data.
3. Data Storage and Backup:
• Robust data storage solutions with regular backup schedules.
• Implementation of disaster recovery plans to minimize data loss in
case of server failures.
4. Monitoring Tools:
• Deployment of system monitoring tools for real-time tracking of
server performance, resource utilization, and potential system
anomalies.
5. User Access Management:
23
• Controlled access to the production environment, ensuring that
only authorized personnel can make changes or update the system.
24
7. Details of Hardware & Software Used
25
2. Memory (RAM):
• Minimum of 4 GB RAM, with 8 GB recommended for smooth
application performance.
3. Storage:
• At least 250 GB HDD or SSD to accommodate the application and
data storage.
4. Graphics:
• Integrated graphics capable of supporting at least 1280x720
resolution. Higher resolution support and dedicated graphics are
beneficial for an enhanced UI experience.
5. Operating System:
• Windows 10 or later versions, considering the application’s
optimization for Windows.
6. Networking:
• Standard Ethernet or Wi-Fi connection for online functionalities
like updates and data syncing.
7. Additional Requirements:
• At least one USB port for external backups or data transfer.
• A monitor supporting a minimum resolution of 1280x720, with
higher resolutions recommended for better usability.
These specifications aim to ensure that Expense Tracker operates efficiently and
reliably on a wide range of systems, balancing performance with affordability.
Adjustments to these requirements might be necessary based on future software
updates or evolving user needs.
Version Control
1. Git:
• Essential for version control, Git facilitates effective change
tracking, collaborative development, and code management. The
27
code repository will likely be hosted on platforms like GitHub or
Bitbucket.
Build Tool
1. Apache Maven:
• Utilized for project build automation and dependency management,
Maven ensures a consistent build process across different
development environments.
This software stack ensures that Expense Tracker is built on a foundation of
reliable and well-supported technologies, providing a robust structure for the
application's development and future scalability. The combination of Java and
JavaFX for front-end development, MySQL for data management, and
supportive tools like IntelliJ IDEA and Maven creates an efficient and cohesive
development environment.
28
8. System Maintenance
29
• Make improvements to the codebase as needed to enhance
performance and user experience.
User Support and Feedback
1. User Support System:
• Set up a simple support system, possibly using email or an online
form, to assist users with any queries or issues.
• Maintain an FAQ section or a simple user guide to help users
navigate common challenges.
2. Feedback Loop:
• Encourage users to provide feedback through simple surveys or
direct communication.
Documentation and Training Material Updates
1. Documentation Updates:
• Keep any project documentation, such as user guides or online help
resources, updated with information on recent changes or new
features.
• Accompany updates with brief release notes summarizing the
changes.
2. Training Resources:
• Update any available tutorials or guides to reflect new features or
changes in the application.
Backup and Security
1. Data Backups:
• Regularly back up any data related to the project to prevent loss
due to system failure.
2. Security Checks:
• Conduct basic security checks periodically to ensure the
application remains secure against common vulnerabilities.
This maintenance plan for Expense Tracker is designed to be manageable and
realistic, considering the scale of the project. It emphasizes the importance of
regular updates, user support, and maintaining the application's security and
performance.
30
31
9. Evaluation
32
These metrics offer a broad view of the Expense Tracker's performance,
covering technical efficiency, user experience, and stability. Regular assessment
using these metrics will help in making necessary improvements and ensuring
the application aligns with user needs and expectations in a manageable and
practical manner.
34
10. DETAILED LIFE CYCLE
1. Integration Testing:
2. System Testing:
35
Sr. No. Test Case Description Status
36
11. CODING AND SCREENSHOT OF THE PROJECT
1. CODING
login.fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
37
<children>
<FontAwesomeIconView glyphName="HOME" size="60" />
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Expense
Tracker" />
<Label text="v 1.0.0" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="500.0">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" styleClass="login-right-
container">
<StackPane.margin>
<Insets bottom="150.0" left="10.0" right="10.0" top="150.0" />
</StackPane.margin>
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Login">
<VBox.margin>
<Insets bottom="30.0" />
</VBox.margin>
</Text>
<Label text="Username" />
<TextField fx:id="usernameTextField">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</TextField>
<Label text="Password" />
<PasswordField fx:id="passwordTextField">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</PasswordField>
38
<Button fx:id="loginButton" mnemonicParsing="false"
onAction="#onLoginButton" prefHeight="32.0" prefWidth="445.0" text="Login">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Button>
<Button fx:id="registerButton" mnemonicParsing="false"
onAction="#onRegisterButton" prefWidth="445.0" text="Register">
<VBox.margin>
<Insets bottom="20.0" />
</VBox.margin>
</Button>
<Label fx:id="loginErrorLabel" styleClass="error-label" text="Label">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
</children>
</VBox>
</children>
</StackPane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
39
register.fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
40
<Label text="v 1.0.0" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="500.0">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" styleClass="login-right-
container">
<StackPane.margin>
<Insets bottom="150.0" left="10.0" right="10.0" top="150.0" />
</StackPane.margin>
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Register">
<VBox.margin>
<Insets bottom="30.0" />
</VBox.margin>
</Text>
<Label text="Username" />
<TextField fx:id="usernameTextField">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</TextField>
<Label text="Password" />
<PasswordField fx:id="passwordTextField">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</PasswordField>
<Label text="Repeat Password" />
<PasswordField fx:id="repeatPasswordTextField">
<VBox.margin>
<Insets bottom="15.0" />
41
</VBox.margin>
</PasswordField>
<Button fx:id="registerButton" mnemonicParsing="false"
onAction="#onRegisterButton" prefWidth="445.0" text="Register">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Button>
<Button fx:id="loginButton" mnemonicParsing="false"
prefWidth="445.0" text="Login">
<VBox.margin>
<Insets bottom="20.0" />
</VBox.margin>
</Button>
<Label fx:id="errorLabel" styleClass="error-label" text="Label">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
</children>
</VBox>
</children>
</StackPane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
42
dashboard.fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.chart.PieChart?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
43
<children>
<ComboBox fx:id="monthPicker" onAction="#onMonthSelect"
prefWidth="150.0" styleClass="hbox-centered" />
<ComboBox fx:id="yearPicker" onAction="#onYearSelect"
prefWidth="150.0" />
<Button fx:id="currentMonthBtn" mnemonicParsing="false"
onAction="#onCurrentMonthBtnClicked" text="Current Month">
<HBox.margin>
<Insets left="20.0" />
</HBox.margin>
</Button>
</children>
</HBox>
</children>
</StackPane>
<StackPane prefHeight="100.0" prefWidth="500.0" styleClass="add-expense-
container">
<children>
<Button fx:id="addExpenseButton" mnemonicParsing="false"
onAction="#onAddExpenseButtonClicked" text="Add Expense">
<graphic>
<FontAwesomeIconView glyphName="PLUS" size="20" />
</graphic>
</Button>
</children></StackPane>
</children>
</HBox>
</children>
</VBox>
<VBox layoutX="75.0" layoutY="300.0" prefHeight="200.0" prefWidth="100.0"
AnchorPane.bottomAnchor="100.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="100.0">
<children>
<HBox prefHeight="700.0" prefWidth="1000.0">
44
<children>
<StackPane prefHeight="700.0" prefWidth="700.0">
<children>
<Pane prefHeight="200.0" prefWidth="200.0">
<children>
<Label layoutX="26.0" layoutY="14.0" text="Search" />
<TableView fx:id="tableView" layoutX="26.0" layoutY="47.0"
prefHeight="544.0" prefWidth="650.0">
<columns>
<TableColumn fx:id="dateTableColumn"
prefWidth="96.80001831054688" text="Date" />
<TableColumn fx:id="typeTableColumn"
prefWidth="190.39999389648438" text="Type" />
<TableColumn fx:id="categoryTableColumn" minWidth="0.0"
prefWidth="119.20001220703125" text="Category" />
<TableColumn fx:id="amountTableColumn"
prefWidth="136.79998779296875" text="Amount" />
<TableColumn fx:id="noteTableColumn"
prefWidth="97.5999755859375" text="Note" />
</columns>
</TableView>
<TextField layoutX="83.0" layoutY="10.0" prefHeight="25.0"
prefWidth="593.0" />
</children>
</Pane>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="300.0">
<children>
<Pane prefHeight="200.0" prefWidth="200.0" styleClass="pane-container">
<children>
<Label layoutX="14.0" layoutY="14.0" styleClass="total-expense-header-
text" text="Expense Details" />
<Label layoutX="14.0" layoutY="47.0" styleClass="total-expense-title-
45
text" text="Income" />
<Label fx:id="incomeLabel" layoutX="100.0" layoutY="44.0"
styleClass="total-expense-income-amt-text" text="0.0" />
<Label layoutX="14.0" layoutY="69.0" styleClass="total-expense-title-
text" text="Expense" />
<Label fx:id="expenseLabel" layoutX="100.0" layoutY="69.0"
styleClass="total-expense-expense-amt-text" text="0.0" />
<Label layoutX="14.0" layoutY="97.0" styleClass="total-expense-title-
text" text="Total" />
<Label fx:id="totalLabel" layoutX="100.0" layoutY="94.0"
styleClass="total-expense-total-amt-text" text="0.0" />
<Label layoutX="9.0" layoutY="242.0" styleClass="total-expense-title-
text" text="Chart" />
<PieChart fx:id="pieChart" layoutX="18.0" layoutY="299.0"
prefHeight="182.0" prefWidth="255.0" />
</children>
</Pane>
</children>
<HBox.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</HBox.margin>
</StackPane>
</children>
</HBox>
</children>
</VBox>
<VBox layoutX="10.0" layoutY="10.0" prefHeight="200.0" prefWidth="100.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="700.0">
<children>
<HBox prefHeight="100.0" prefWidth="200.0">
<children>
<StackPane prefHeight="100.0" prefWidth="500.0">
<children>
46
<VBox prefHeight="200.0" prefWidth="100.0" styleClass="footer-title-
container">
<children>
<FontAwesomeIconView size="20" />
<Label text="Expense Tracker" />
<Label styleClass="version-label" text="v 1.0.0" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="100.0" prefWidth="500.0">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" styleClass="footer-copyright-
container">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Report Bugs?"
/>
<Label text="Use this to report any errors or suggestions" />
<Button fx:id="reportBugButton" mnemonicParsing="false"
text="Report">
<graphic>
<FontAwesomeIconView glyphName="BUG" size="12" />
</graphic>
</Button>
</children>
</VBox>
</children>
</StackPane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
47
48
add-expense.fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
49
<children>
<ComboBox disable="true" prefWidth="150.0" styleClass="hbox-
centered" />
<ComboBox disable="true" prefWidth="150.0" />
<Button disable="true" mnemonicParsing="false" text="Current Month">
<HBox.margin>
<Insets left="20.0" />
</HBox.margin>
</Button>
</children>
</HBox>
</children>
</StackPane>
<StackPane prefHeight="100.0" prefWidth="500.0" styleClass="add-expense-
container">
<children>
<Button disable="true" mnemonicParsing="false" text="Add Expense">
<graphic>
<FontAwesomeIconView glyphName="PLUS" size="20" />
</graphic>
</Button>
</children>
</StackPane>
</children>
</HBox>
</children>
</VBox>
<VBox layoutX="75.0" layoutY="300.0" prefHeight="200.0" prefWidth="100.0"
AnchorPane.bottomAnchor="100.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="100.0">
<children>
<HBox prefHeight="700.0" prefWidth="1000.0">
<children>
<Pane prefHeight="700.0" prefWidth="1045.0" styleClass="add-expense-
50
dashboard-container">
<children>
<Label layoutX="345.0" layoutY="84.0" text="Date" />
<DatePicker fx:id="datePicker" layoutX="452.0" layoutY="80.0"
prefHeight="25.0" prefWidth="200.0" promptText="Pick a Date" />
<ChoiceBox fx:id="categorySelector" layoutX="454.0" layoutY="187.0"
prefHeight="25.0" prefWidth="200.0" />
<ComboBox fx:id="typeSelector" layoutX="452.0" layoutY="139.0"
onAction="#onTypeSelectorChange" prefHeight="33.0" prefWidth="200.0" />
<TextField fx:id="amountTextField" layoutX="455.0" layoutY="243.0"
prefHeight="25.0" prefWidth="200.0" />
<TextArea fx:id="noteTextArea" layoutX="454.0" layoutY="292.0"
prefHeight="200.0" prefWidth="200.0" />
<Label layoutX="345.0" layoutY="191.0" text="Category" />
<Label layoutX="346.0" layoutY="139.0" text="Type" />
<Label layoutX="346.0" layoutY="247.0" text="Amount" />
<Label layoutX="348.0" layoutY="388.0" text="Note" />
<Button fx:id="expenseSubmitButton" layoutX="455.0" layoutY="530.0"
mnemonicParsing="false" onAction="#onAddExpenseButton" prefHeight="25.0"
prefWidth="200.0" text="Submit" />
</children>
</Pane>
</children>
</HBox>
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="700.0">
<children>
<HBox prefHeight="100.0" prefWidth="200.0">
<children>
<StackPane prefHeight="100.0" prefWidth="500.0">
<children>
51
<VBox prefHeight="200.0" prefWidth="100.0" styleClass="footer-title-
container">
<children>
<FontAwesomeIconView size="20" />
<Label text="Expense Tracker" />
<Label styleClass="version-label" text="v 1.0.0" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="100.0" prefWidth="500.0">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" styleClass="footer-copyright-
container">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Report Bugs?"
/>
<Label text="Use this to report any errors or suggestions" />
<Button mnemonicParsing="false" text="Report">
<graphic>
<FontAwesomeIconView glyphName="BUG" size="12" />
</graphic>
</Button>
</children>
</VBox>
</children>
</StackPane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
52
53
1.1.2 Controllers
LoginController
package org.bekoder.expensetracker.controllers;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import java.io.IOException;
import java.net.URL;
import java.sql.SQLException;
import java.util.ResourceBundle;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.bekoder.expensetracker.Application;
import org.bekoder.expensetracker.bootstrap.Instantiator;
import org.bekoder.expensetracker.dao.UserDAO;
@FXML
private TextField usernameTextField;
@FXML
private PasswordField passwordTextField;
@FXML
private Button loginButton;
@FXML
private Button registerButton;
@FXML
private Label loginErrorLabel;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
loginErrorLabel.setVisible(false);
}
@FXML
private void onLoginButton() {
54
System.out.println("Login button clicked");
String username = usernameTextField.getText();
String password = passwordTextField.getText();
try {
if (userDAO.checkLogin(username, password)) {
loginErrorLabel.setVisible(false);
DashboardController dashboardController =
Instantiator.getDashboardControllerInstance(userId);
} else {
loginErrorLabel.setVisible(true);
loginErrorLabel.setText("Invalid username or password");
System.out.println("Login failed");
}
} catch (SQLException | IOException e) {
throw new RuntimeException(e);
}
}
@FXML
private void onRegisterButton() {
System.out.println("Register button clicked");
try {
FXMLLoader fxmlLoader = new
FXMLLoader(Application.class.getResource("register.fxml"));
fxmlLoader.setController(Instantiator.registrationController);
Parent root = fxmlLoader.load();
55
} catch (IOException e) {
throw new RuntimeException(e);
}
}
56
RegistrationController
package org.bekoder.expensetracker.controllers;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.bekoder.expensetracker.Application;
import org.bekoder.expensetracker.bootstrap.Instantiator;
import org.bekoder.expensetracker.dao.UserDAO;
import java.net.URL;
import java.util.ResourceBundle;
@FXML
private TextField usernameTextField;
@FXML
private PasswordField passwordTextField;
@FXML
private PasswordField repeatPasswordTextField;
@FXML
private Label errorLabel;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
errorLabel.setVisible(false);
}
@FXML
private void onRegisterButton() {
System.out.println("Register button clicked from RegistrationController");
try {
String username = usernameTextField.getText();
String password = passwordTextField.getText();
57
String repeatPassword = repeatPasswordTextField.getText();
if (password.equals(repeatPassword)) {
if (userDAO.isUsernameExists(username)) {
errorLabel.setVisible(true);
errorLabel.setText("Username already exists");
} else {
userDAO.addUser(username, password);
int userId = userDAO.getUserId(username, password);
DashboardController dashboardController =
Instantiator.getDashboardControllerInstance(userId);
} else {
errorLabel.setVisible(true);
errorLabel.setText("Passwords do not match");
}
} catch (Exception e) {
e.printStackTrace();
}
}
58
DashboardController
package org.bekoder.expensetracker.controllers;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.chart.PieChart;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.bekoder.expensetracker.Application;
import org.bekoder.expensetracker.ExpenseTableView;
import org.bekoder.expensetracker.bootstrap.Instantiator;
import org.bekoder.expensetracker.dao.ExpenseDAO;
import org.bekoder.expensetracker.dao.entites.Expense;
import java.io.IOException;
import java.net.URL;
import java.sql.SQLException;
import java.time.LocalDate;
import java.time.Month;
import java.time.Year;
import java.time.format.TextStyle;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@FXML
private ComboBox<String> monthPicker;
@FXML
private ComboBox<String> yearPicker;
@FXML
59
private Button currentMonthBtn;
@FXML
private Button addExpenseButton;
@FXML
private Label expenseLabel;
@FXML
private Label incomeLabel;
@FXML
private Label totalLabel;
@FXML
private TableView<ExpenseTableView> tableView;
@FXML
private TableColumn<ExpenseTableView, String> dateTableColumn;
@FXML
private TableColumn<ExpenseTableView, String> typeTableColumn;
@FXML
private TableColumn<ExpenseTableView, String> categoryTableColumn;
@FXML
private TableColumn<ExpenseTableView, String> amountTableColumn;
@FXML
private TableColumn<ExpenseTableView, String> noteTableColumn;
@FXML
private PieChart pieChart;
ObservableList<ExpenseTableView> expenseTableViewObservableList =
FXCollections.observableArrayList();
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
monthPicker.getItems().addAll("January", "February", "March", "April", "May", "June",
"July", "August",
"September", "October", "November", "December");
monthPicker.setValue(LocalDate.now().getMonth().getDisplayName(TextStyle.FULL,
java.util.Locale.US));
yearPicker.setValue(String.valueOf(Year.now().getValue()));
60
String year = yearPicker.getValue();
updateDashboard(month, year);
@FXML
private void onYearSelect() {
String month = monthPicker.getValue();
String year = yearPicker.getValue();
updateDashboard(month, year);
}
dateTableColumn.setCellValueFactory(new PropertyValueFactory<>("date"));
typeTableColumn.setCellValueFactory(new PropertyValueFactory<>("type"));
categoryTableColumn.setCellValueFactory(new PropertyValueFactory<>("category"));
amountTableColumn.setCellValueFactory(new PropertyValueFactory<>("amount"));
noteTableColumn.setCellValueFactory(new PropertyValueFactory<>("note"));
tableView.setItems(expenseTableViewObservableList);
61
}
expenseLabel.setText(String.valueOf(totalExpense));
incomeLabel.setText(String.valueOf(totalIncome));
totalLabel.setText(String.valueOf(totalLeft));
updateTableView(expenses);
fillPieChartWithData(pieChart, expenses);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@FXML
private void onMonthSelect() {
String month = monthPicker.getValue();
String year = yearPicker.getValue();
updateDashboard(month, year);
}
@FXML
private void onCurrentMonthBtnClicked() {
System.out.println("Current month button clicked");
monthPicker.setValue(LocalDate.now().getMonth().getDisplayName(TextStyle.FULL,
java.util.Locale.US));
yearPicker.setValue(String.valueOf(Year.now().getValue()));
updateDashboard(month, year);
}
@FXML
62
private void onAddExpenseButtonClicked() {
AddExpenseController addExpenseController =
Instantiator.getAddExpenseControllerInstance(userId, expenseDAO);
try {
FXMLLoader fxmlLoader = new FXMLLoader(Application.class.getResource("add-
expense.fxml"));
fxmlLoader.setController(addExpenseController);
Parent root = fxmlLoader.load();
} catch (IOException e) {
throw new RuntimeException(e);
}
63
AddExpenseController
package org.bekoder.expensetracker.controllers;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.bekoder.expensetracker.Application;
import org.bekoder.expensetracker.bootstrap.Instantiator;
import org.bekoder.expensetracker.dao.ExpenseDAO;
import org.bekoder.expensetracker.dao.entites.Expense;
import java.net.URL;
import java.sql.SQLException;
import java.util.ResourceBundle;
@FXML
private void onTypeSelectorChange() {
categorySelector.getItems().clear();
if (typeSelector.getValue().equals("Income")) {
categorySelector.getItems().addAll(incomeCategory);
} else {
categorySelector.getItems().addAll(expenseCategory);
}
}
@Override
64
public void initialize(URL url, ResourceBundle resourceBundle) {
typeSelector.getItems().addAll("Income", "Expense");
categorySelector.getItems().clear();
amountTextField.setText("0");
@FXML
private DatePicker datePicker;
@FXML
private ComboBox<String> typeSelector;
@FXML
private ChoiceBox<String> categorySelector;
@FXML
private TextField amountTextField;
@FXML
private TextArea noteTextArea;
@FXML
private void onAddExpenseButton() {
65
Instantiator.getDashboardControllerInstance(userId);
66
1.1.3 DAO
ExpenseDao
package org.bekoder.expensetracker.dao;
import org.bekoder.expensetracker.dao.entites.Expense;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
while (resultSet.next()) {
Expense expense = new Expense(
resultSet.getInt("id"),
resultSet.getInt("userId"),
resultSet.getDate("date"),
resultSet.getString("type"),
resultSet.getString("category"),
resultSet.getDouble("amount"),
67
resultSet.getString("note")
);
expenses.add(expense);
}
}
return expenses;
}
while (resultSet.next()) {
totalIncome = resultSet.getDouble("SUM(amount)");
}
}
return totalIncome;
}
while (resultSet.next()) {
totalExpense = resultSet.getDouble("SUM(amount)");
}
}
return totalExpense;
}
}
UserDao
package org.bekoder.expensetracker.dao;
68
import java.sql.*;
69
Main Class File: Application
package org.bekoder.expensetracker;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.bekoder.expensetracker.bootstrap.Instantiator;
import java.io.IOException;
70
2. SCREENSHOT
Login Screen
71
Invalid Login with Error Message
72
Registration Page
73
Dashboard (Empty)
74
Dashboard with Data
75
Add Expense Window
76
12. CONCLUSION AND FUTURE SCOPE
Conclusion
The Expense Tracker project has successfully demonstrated key aspects of
software development. This application effectively integrates essential
functionalities of expense tracking and budget management within a
straightforward user interface. Notable achievements of this project include the
hands-on experience in coding, interface design, and basic database integration.
The project's journey from initial concept to functional software has provided a
practical understanding of the software development lifecycle. Addressing
challenges in coding, debugging, and user experience design reflects the
project's successful implementation within its educational context.
Future Scope
Looking ahead, the Expense Tracker offers numerous opportunities for
enhancement and further development:
1. Feature Expansion:
• Introduce more detailed categorization of expenses and visual
analytics for a comprehensive financial overview.
2. Enhanced User Interface:
• Improve the interface design to make it more engaging and user-
friendly, utilizing advanced features of JavaFX.
3. Data Storage Enhancements:
• Upgrade data storage solutions, potentially moving from simple
file-based systems to more sophisticated database management.
4. Incorporation of Security Measures:
• Implement fundamental security features, such as password
encryption, to ensure user data protection.
5. Code Refinement:
• Focus on optimizing and refactoring the codebase for better
efficiency and maintainability.
6. Gathering and Implementing User Feedback:
• Collect feedback from users to refine the application, enhancing its
functionality and user experience.
7. Exploration of Mobile Platforms:
77
• Consider adapting the application for mobile platforms,
introducing elements of mobile app development.
8. Continuous Learning and Development:
• Use the project as a platform for ongoing educational development,
exploring new technologies, programming techniques, and best
practices in software engineering.
78
13. REFERENCE
For the Expense Tracker project, the references and resources utilized include a
combination of technical documentation, educational materials, and software
development tools. Here's a list of key references:
1. Java Documentation: Official documentation provided by Oracle for
Java programming language, offering comprehensive guides and
reference materials for Java development.
• Link: Java Documentation
2. JavaFX Documentation: Official resource for JavaFX, providing
detailed information on building user interfaces with JavaFX.
• Link: JavaFX Documentation
3. MySQL Documentation: The official documentation for MySQL
database management system, useful for understanding database
integration and SQL queries.
• Link: MySQL Documentation
4. IntelliJ IDEA Documentation: Comprehensive guide and reference for
IntelliJ IDEA, the chosen Integrated Development Environment (IDE) for
the project.
• Link: IntelliJ IDEA Documentation
5. Apache Maven Documentation: Official documentation for Apache
Maven, providing insights into project build and dependency
management.
• Link: Apache Maven Documentation
6. Git Documentation: Reference material for using Git, a version control
system essential for managing the project’s codebase.
• Link: Git Documentation
7. Stack Overflow and Developer Forums: Community-driven question-
and-answer websites that provide practical solutions and advice from the
global developer community.
• Link: Stack Overflow
8. Online Programming Tutorials and Courses: Various online platforms
offering tutorials and courses on Java, JavaFX, MySQL, and other
relevant technologies.
79
9. Software Development Textbooks and eBooks: Educational materials
covering fundamental and advanced concepts in software development,
programming languages, and database management.
These references have been instrumental in guiding the development of the
Expense Tracker project, offering both theoretical knowledge and practical
guidance.
80