Skip to content

This project implements an expense database to manage financial expenses using Python's object-oriented programming concepts.

Notifications You must be signed in to change notification settings

damidfkm/ExpenseDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

ExpenseDB

This project implements an expense database to manage financial expenses using Python's object-oriented programming (OOP) concepts.

It consists of two main classes: Expense and ExpenseDatabase, allowing users to model and manage financial expenses efficiently.

Project Structure

  • expense.py: Contains the Expense and ExpenseDatabase classes.
  • expense_db.py: Demonstrates the usage of the implemented classes to manage expenses.

Cloning the Project

  • Copy this Repository's URL: Click on the green "Code" button and copy the URL provided (https://github.com/damidfkm/ExpenseDB). You can click the clipboard icon next to the URL to copy it.

  • Open Terminal or Command Prompt: Open a terminal or command prompt on your computer.

  • Navigate to the Directory Where You Want to Clone the Repository: Use the cd command to navigate to the directory where you want to clone the repository. For example:

cd path/to/desired/directory
  • Clone the Repository: Use the git clone command followed by the URL you copied earlier.
git clone https://github.com/damidfkm/ExpenseDB.git
  • Confirm the Cloning Process: Wait for the cloning process to complete. Once it's finished, you'll have a local copy of the repository on your computer in the directory you specified.

  • Remember, you'll need Git installed on your computer to use the git clone command.

However, if you're looking for alternatives to clone or download a repository without using the command line or Git, you can use the GitHub website interface:

  • Using GitHub's "Download ZIP" Option:

  • Click on the green "Code" button.

  • Select "Download ZIP."

This will download a compressed file (ZIP) of this repository to your computer. Extract the contents to access the files.

Running the code

To run the code:

  • Ensure you have Python installed (Python 3.7 or higher).
  • Navigate to the project directory in your terminal.
  • Run the following command:
python3 expense_db.py

This will execute the demonstration code in expense_db.py, showcasing various functionalities of the expense database.

Usage

Expense Class:

  • Represents an individual expense.
  • Use the update method to modify an expense's title or amount.

ExpenseDatabase Class:

  • Manages a collection of expenses.
  • Use methods like add_expense, remove_expense, get_expense_by_id, and get_expense_by_title to handle expenses in the database.

About

This project implements an expense database to manage financial expenses using Python's object-oriented programming concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages