Skip to content

Enthuasish/Automated-Ride-Sharing-Fare-Calculator-Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚖 Automated Ride-Sharing Fare Calculator & Logger

Overview

The Automated Ride-Sharing Fare Calculator & Logger is a Python-based console application developed using Object-Oriented Programming (OOP) concepts. It allows a rider to log completed rides, automatically calculates the ride fare based on ride type and time slot, stores ride details in a log file, and generates a daily revenue report.

This project demonstrates the practical implementation of classes, objects, file handling, dictionaries, lists, and menu-driven programming in Python.


Features

  • Log completed rides
  • Automatic fare calculation
  • Dynamic pricing using nested dictionaries
  • View all rides logged during the session
  • Store ride history in a text file
  • Generate a daily revenue report
  • Menu-driven console interface
  • Uses Object-Oriented Programming (OOP)

Fare Pricing

Standard Ride

Time Slot Price per km
Morning ₹15
Afternoon ₹18
Evening ₹20
Night ₹24

Premium Ride

Time Slot Price per km
Morning ₹22
Afternoon ₹25
Evening ₹28
Night ₹35

Fare Formula

Fare = Distance × Rate per Kilometer

Technologies Used

  • Python 3
  • Jupyter Notebook
  • Object-Oriented Programming (OOP)
  • File Handling
  • Lists
  • Dictionaries

Project Structure

Automated Ride-Sharing Fare Calculator & Logger/
│
├── FareCalculator.ipynb        # Main project
├── Ridelog.txt                 # Stores completed rides
├── daily_ride_report.txt       # Daily revenue report
├── .gitignore
└── README.md

Menu Options

1. Log Ride
2. Today's Rides
3. Today's Revenue Report
4. Exit

Sample Workflow

  1. Enter Rider ID and Rider Name.

  2. Select Log Ride.

  3. Enter:

    • Customer Name
    • Pickup Location
    • Drop Location
    • Distance
    • Ride Type (Standard/Premium)
    • Time Slot (Morning/Afternoon/Evening/Night)
  4. The application calculates the fare automatically.

  5. Ride details are stored in Ridelog.txt.

  6. Select Today's Revenue Report to generate daily_ride_report.txt.


OOP Concepts Used

  • Classes and Objects
  • Constructors
  • Instance Variables
  • Methods
  • Encapsulation
  • Method Overriding (__str__)
  • Object Composition

Learning Outcomes

This project helped in understanding:

  • Object-Oriented Programming in Python
  • Menu-driven application development
  • Dynamic fare calculation
  • Nested dictionaries
  • File reading and writing
  • Report generation
  • Basic Git and GitHub project management

Future Enhancements

  • Rider login system
  • Customer database
  • Date and time-based ride history
  • Monthly revenue reports
  • CSV/Excel export
  • Graphical User Interface (Tkinter)
  • Database integration (SQLite/MySQL)

Author

Asish Amitansu Rout

MCA Student | Python | Data Analytics


License

This project is created for educational and learning purposes.

About

A Python console application that simulates a ride-sharing system with automated fare calculation, surge pricing, ride logging, and file handling for report generation using Object-Oriented Programming.

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Contributors