[go: up one dir, main page]

0% found this document useful (0 votes)
35 views10 pages

Expense Tracker Paper

The Expense Tracker Program is a C-based application designed to help users manage their expenses through a user-friendly interface, allowing for adding, editing, deleting, and viewing expense entries while monitoring budget limits. It utilizes data structures for organizing expense details and incorporates error handling for input validation, though it has limitations such as lack of data persistence and platform dependency. Future enhancements could include persistent data storage, dynamic memory allocation, and a graphical user interface to improve user experience.

Uploaded by

jimplayzm
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)
35 views10 pages

Expense Tracker Paper

The Expense Tracker Program is a C-based application designed to help users manage their expenses through a user-friendly interface, allowing for adding, editing, deleting, and viewing expense entries while monitoring budget limits. It utilizes data structures for organizing expense details and incorporates error handling for input validation, though it has limitations such as lack of data persistence and platform dependency. Future enhancements could include persistent data storage, dynamic memory allocation, and a graphical user interface to improve user experience.

Uploaded by

jimplayzm
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/ 10

EXPENSE TRACKER SYSTEM

MANAGE YOUR EXPENSES AND STAY ON BUDGET

A Final Output Project


CpE PC 215
Presented to the Faculty of Computer
Engineering Department
Cebu Technological University – Danao Campus
Sabang, Danao City, Philippines

In partial fulfillment
of the Requirements for the Degree in
Bachelor of Science in Computer Engineering

By
Jennel Arquillano
Shella Mea Gonzales
Charles Lauron
Mary Ann Montero
Fiona Minami Pancho
Jhonus Eizhah Usbah

ENGR. FRANCIS GIO P. LAUREL


Adviser

January 2024
I. ABSTRACT
The Expense Tracker Program was developed to assist users in effectively managing their

budgets through a user-friendly interface designed in the C programming language. This menu-

driven program allowed users to add, edit, delete, and view expense entries while providing real-

time calculations of total expenses and monitoring budget limits. By utilizing data structures such

as struct, the program organized essential expense details including item name, price, quantity,

date, payment method, and subtotal. Additionally, the program incorporated effective error

handling to manage invalid inputs, while modularized functions were designed to enhance both

usability and maintainability. The program not only served as a valuable personal finance

management tool but also exemplified core principles of Data Structures and Algorithms in solving

real-world problems. Future enhancements could include data storage solutions and advanced

categorization options to further improve user experience.

II. OBJECTIVES

The objectives for the Expense Tracker Program focus on several key areas of study.

• Examine how individuals record, monitor, and modify their daily financial transactions

using a simple interface.

• Assess the effectiveness of features such as expense entry, editing, deletion, and real-time

calculation of remaining budgets in enhancing user financial awareness.

• Study the impact of error handling, input validation, and user-friendly prompts on reducing

errors and improving the overall user experience.

• Understand how providing real-time feedback on remaining allowance or over-budget

status influences users’ financial decision-making and habits.


This research seeks to contribute to the broader understanding of personal financial management

tools and their potential to improve budgeting efficiency among users.

III. SCOPES AND LIMITATIONS

Scope

The "Expense Tracker" is a console-based application developed to help users track their

daily, weekly, or monthly expenses. It allows users to efficiently manage their expenditures and

track the remaining allowance or budget. Key features include adding, deleting, and editing

expense entries, displaying expenses, and updating the budget allowance. This project aims to

provide a simple and effective solution for individuals who want to monitor their spending and

make informed decisions.

Key Features Included:

-Adding Expenses: Users can add new expenses, including details like item name, price,

quantity, date, and payment method.

-Editing Expenses: Users can edit previously entered expenses, modifying details like

price, quantity, name, payment method, and date.

-Deleting Expenses: Users can delete an expense from the list.

-Displaying Expenses: The application will display all recorded expenses, showing item

names, prices, quantities, payment methods, and subtotals.

-Budget and Remaining Allowance: Users input a weekly allowance, and the application

will show the total expenses and remaining allowance or alert the user if the budget is exceeded.

-Clear Screen: Users can clear the terminal screen for a cleaner view of the data.
-Allowance Update: Users can change the weekly allowance at any time to adjust the

budget.

Limitations

-Platform Dependency: This is a console-based application, so it requires a terminal or

command-line interface to run. It is platform-dependent and may not be suitable for those

unfamiliar with command-line tools.

-Data Persistence: The program does not support saving data to files (e.g., databases or

text files). All data will be lost once the program is exited unless modified to incorporate file

handling.

-Limited Data Input Validation: Although the program has input validation for numerical

values (prices and quantities), it does not enforce strict validation for all types of user input (e.g.,

date and payment method).

-Fixed Size Array: The expense list is implemented using a statically allocated array with

a maximum of 100 entries. If the user needs to manage more than 100 entries, the program will

show an error and prevent further entries.

-No Security or Authentication: The program does not have any password or user

authentication mechanism, meaning anyone with access to the program can modify or view the

expenses.

-Single User Use: This version of the tracker is designed for use by a single user. It does

not support multi-user functionality or allow for multiple user profiles.


IV. METHODOLOGY

1. Requirement Analysis:

The primary goal is to track weekly expenses and compare them against a user-defined

allowance. The application allows the user to add, edit, delete, and view expense records, while

also managing the total expenses and remaining allowance.

2. Design:

Data Structure Design:

Expense Structure: A struct is used to represent individual expense records. This structure holds

the attributes for each expense, which includes:

• name: A string to store the name of the expense.

• price: A floating-point number to store the price of the item.

• quantity: A floating-point number to store the quantity of the item purchased.

• date: A string to store the date of the expense.

• method: A string to store the payment method used (e.g., credit card, cash).

• subtotal: A floating-point number calculated as the product of price and quantity for each

entry.

This structure is used to create an array of expenses, allowing for dynamic management of entries,

with each index holding an individual expense.


Algorithm Concepts:

Input Validation: Since the program deals with user input for price, quantity, and other

values, input validation is implemented using scanf to ensure that the user enters valid numerical

data for expenses (e.g., price and quantity).

Error Handling: Input is repeatedly asked for until valid data is entered. For example, the user is

prompted again if a non-numeric input is entered for a price or quantity. This is achieved through

while loops with checks for valid scanf inputs.

Memory Management: The number of expenses is managed by a statically allocated array

(Expenses items[limit]), where limit is set to 100, ensuring that the system does not exceed

memory limits.

3. Core Functions and Algorithm Concepts:

Add Expense (addExpense):

The algorithm to add a new expense involves taking multiple inputs (name, price, quantity,

date, payment method), performing validation checks for numerical inputs (price and quantity),

and then storing the new expense in the next available index in the items array.
Delete Expense (deleteExpense):

Deletion of an expense involves displaying the current expenses, asking the user to select

an entry, and then shifting all subsequent entries in the list to fill the gap left by the deleted expense.

This is done in the following steps:

-Prompt the user for an index.

-Shift each subsequent entry one position to the left, effectively removing the selected

expense from the list.

Edit Expense (editExpense):

Editing an expense involves first selecting an expense by its index, then offering the user

the option to modify different fields (name, price, quantity, date, method). The selected field is

updated based on user input.

Display Expenses (displayExpenses):

This function displays all expenses along with their details, such as the price, quantity, and

subtotal. It iterates through the entire list of expenses to print each entry in a formatted table.

Clear Screen (clearScreen):

This function simulates clearing the screen by printing multiple newlines. It doesn't involve

any complex algorithms or data structures but provides a simple user interface enhancement.
4. Memory Usage:

Static Array: The array of Expenses items[limit] is statically defined with a limit of 100. This

limits the number of expenses the program can track. If more entries are needed, the user will be

informed that the list is full.

Memory Complexity: The array uses O(n) memory where n is the number of expenses (up to 100

in the current implementation). Each expense is an instance of the Expenses struct, which holds

several pieces of data (strings and floats), contributing to the overall memory usage.

5. Time Complexity:

The program primarily operates with linear time complexity O(n) for functions that iterate

over the array of expenses to display, delete, or recalculate totals.

Add, Delete, Edit: These operations are O(1) for their primary actions (storing data, deleting data,

updating a single entry), but recalculating the total expense is O(n) since the program has to iterate

over the entire list to calculate the updated total.

6. User Interface (UI) Design:

• Menu-Driven Interface: A simple text-based menu system allows users to choose from

options such as adding, editing, deleting, displaying, and clearing expenses. This is

implemented using a while loop that continuously prompts the user for their choice until

they decide to exit.


• Error Handling: Users are prompted repeatedly if they input invalid data. This is done using

loops to check if inputs are valid and ensuring that the data is of the correct type (e.g., float

for price and quantity, integer for menu choice).

7. Testing:

The core functionalities (adding, deleting, editing, displaying expenses) are thoroughly

tested to ensure that the expense tracker handles all scenarios correctly. Testing includes verifying:

• Proper handling of user inputs, including invalid inputs.

• Correct calculation of the total expenses after each operation.

• Appropriate error messages for boundary conditions (e.g., trying to delete an item from an

empty list or adding expenses when the limit is reached).

8. Future Enhancements:

• Persistence: One major enhancement for future versions would be saving the data to a file

(e.g., a text or binary file) to allow for persistent storage of expenses across program runs.

• Optimization: To optimize the program further, dynamic memory allocation (using pointers

and malloc) could be considered to allow for a variable-sized list of expenses that grows

as needed.

• Graphical User Interface (GUI): Transitioning from a text-based console interface to a GUI

using libraries such as GTK or Qt to make the application more user-friendly.


V.CONCLUSION

In conclusion, the Expense Tracker Program successfully demonstrates the practical

application of data structures and algorithms to address real-world challenges in personal finance

management. With a menu-driven interface and a robust design centered around C programming,

the program enables users to efficiently add, edit, delete, and view expense records while

monitoring budget limits in real-time. Utilizing modularized functions and structured data

handling, the application balances usability with maintainability, emphasizing core programming

principles. Despite its limitations, such as lack of data persistence and platform dependency, the

program provides a functional and intuitive platform for users to track and manage their expenses

effectively. The design methodology highlights thoughtful consideration of user needs, error

handling, and algorithmic efficiency, showcasing a practical approach to software development.

Future enhancements, including persistent data storage, dynamic memory allocation, and the

integration of a graphical user interface, present opportunities to expand the program’s capabilities

and improve user experience. Overall, the Expense Tracker Program not only achieves its

objectives but also serves as a foundation for continued innovation in personal finance tools.

You might also like