ruilopesm / Uber-Manager-LI3

Uber database look-alike, stored in memory. Used to learn encapsulation and modularity in C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uber Manager

Software Labs III | Laboratórios de Informática III

Grade: 18/20 ⭐

This project was developed during the first semester of the 2nd year of the Software Engineering degree @ University of Minho.

The project consisted of recreating a simplified version of the Uber database. It is important to refer that the whole database is stored in memory, so it is not persistent. The main goal of learning how to apply some OOP principles, such as encapsulation and modularity. It was also a good opportunity to learn how to use some data structures, such as Hash Tables and AVL Trees.

The project has two main modes:

  • Batch: In this mode, the program reads a file with a list of commands and executes them. The commands consist of query-like commands, such as "2 10", which stands for "top 10 drivers by average rating".

  • Interactive: In this mode, the program reads the user's input and executes the command. The commands are the same as the batch mode, but the user can input them directly on the terminal. We used ncurses to create a simple interface for the user. You can preview it below:

Main menu

Main menu

Query result pagination (the user can navigate through the results using some keyboard shortcuts)

Query result pagination

Installing and running the project

Firstly, you will need to install some dependencies such as glib2 and ncurses.

Ubuntu

$ sudo apt-get install libglib2.0-dev libncurses5-dev

Arch Linux

$ sudo pacman -S glib2 ncurses

Fedora

$ sudo dnf install glib2 ncurses

Cloning the repository

$ git clone git@github.com:ruilopesm/Uber-Manager-LI3.git

Compiling

$ cd Uber-Manager-LI3
$ make

Running

$ ./programa-principal <path to *.csv files> <path to input file>

Developed by:

About

Uber database look-alike, stored in memory. Used to learn encapsulation and modularity in C.


Languages

Language:C 84.7%Language:TeX 14.1%Language:Makefile 0.9%Language:Shell 0.3%