Giter VIP home page Giter VIP logo

project_uber's Introduction

Project_Uber

Language: C++

Compiler: MSVC - Visual Studio

Introduction

This is a simplified system of a taxi company. The application is able to support 2 types of users โ€“ customers and drivers. They are be able to register and log in to the system using a username and password, and exit the application without it terminating.

Client's functions

  • ORDER

Orders a taxi by specifying current address, destination and number of passengers. Each address contains a name, coordinates (point with x and y) and additional specifying information (optional for each address). When sending an order to the application, the system must trace the notification to all available drivers, first sending it to the driver closest to the address from which it was ordered. When a driver accepts the order, the system notifies the user. The system generates a unique ID and prints it to the user.

  • CHECK_ORDER

Checks the status of the order by its ID - whether it has been accepted, which driver will fulfill it, what the driver's details are(name and surname, car number, phone number, rating) and how long it will take to arrive.

  • CANCEL_ORDER

Cancel order by its ID. If a driver has already accepted the order, the system releases him and notifies him about it.

  • PAY

Pays for an order by its ID after it has been marked by the driver as completed. The money paid by the user goes into the driver's account.

  • RATE

To rate (from 1 to 5) an otder's driver. The order's driver he is rating must have been accepted by him and already completed.

  • ADD_MONEY

Adds money to the user's account. For convenience, we assume that a valid credit or debit card is entered and no additional checks are made for it.

Driver's functions

  • CHANGE_ADDRESS

Driver changes his current address (name and coordinates).

  • CHECK_MESSAGES

Checks messages sent by the system. These are the orders that the system sends to him.

  • ACCEPT_ORDER

Accepts an order by its ID and sends to the system information on how many minutes it will be at the address.

  • DECLINE_ORDER

Declines an order by its ID. If a driver declines an order, the system should offer it to the next closest driver to the order address.

  • FINISH_ORDER

Marks the order as completed (when it has reached the address). This automatically changes driver's address to the destination address.

  • ACCEPT_PAYMENT

Accept payment. Sends information to the system about how much money he received from it.

How it works

When you start the programme information about drivers, clients and orders is read from file. You are asked to make registration by pressing 1 or log in by pressing 2. After you log in you can do some of the actions, mentioned above, depending on your role. There is a letter which represents every function, you can see them on the console screen. All the users can log out by pressing "q". After you log out, you can make registration, log in or just close the app by pressing "c". As you press "c", all the information about drivers, clients, orders is saved in different files. You can see the company's profit at the bottom of drivers' file.

project_uber's People

Contributors

eliss12 avatar

Watchers

 avatar

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.