Coder Social home page Coder Social logo

bideeen / alt-school-fall-semester-de-exams-hands-on-project-2023 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 353 KB

The goal of this assignment is to assess your understanding of object-oriented programming (OOP) concepts in Python. You will be tasked with implementing two classes, Expense and ExpenseDatabase, to model and manage financial expenses.

Python 100.00%

alt-school-fall-semester-de-exams-hands-on-project-2023's Introduction

Alt-school-Fall-Semester-DE-Exams-Hands-on-Project-2023

Expense Management System

Introduction

This Python project consists of two classes, Expense and ExpenseDatabase, that enable the management of financial expenses.

Usage

To use this code:

  • Clone the repository to your local machine using the following command:
    git clone https://github.com/bideeen/Alt-school-Fall-Semester-DE-Exams-Hands-on-Project-2023.git
    

Running the Code:

  • Ensure you have Python installed on your system.
  • Open a terminal or command prompt.
  • Run the test script by executing:
python test_expense_app.py

Example Usage

The test_expense_app.py script demonstrates the functionality of the Expense and ExpenseDatabase classes. Below is an example of how you can use these classes in your own code:

from expenseApp import Expense, ExpenseDatabase

# Create instances of Expense and ExpenseDatabase classes
expense1 = Expense("Groceries", 50.00)
expense2 = Expense("Dinner", 75.00)

# Initialize an ExpenseDatabase instance
expense_db = ExpenseDatabase()

# Add expenses to the database
expense_db.add_expense(expense1)
expense_db.add_expense(expense2)

# Retrieve an expense by ID
retrieved_expense = expense_db.get_expense_by_id(expense1.id)

# Print the retrieved expense as a dictionary
print(retrieved_expense.to_dict())  

Note: Feel free to modify, run, and extend the code as needed!


Thank You

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.