Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

glfaria/LI3

Repository files navigation

LI3 - Flight Management System

A modular C application for querying airport, flight, passenger, and reservation data.
Academic project built for Laboratórios de Informática III (2025/2026).

Overview

This project implements a flight management system capable of loading and querying large CSV datasets covering airports, flights, aircrafts, passengers, and reservations. The system is designed with a strong emphasis on modularity, encapsulation, and memory safety. The program validates all CSV input (syntactic and logical).

The application supports three execution modes:

Executable Description
programa-principal Batch mode — reads queries from a file and writes results to disk
programa-interativo Interactive mode — terminal UI for exploring data on-the-fly
programa-testes Test mode — validates query outputs and benchmarks performance

Building

Build all executables at once:

make

Running

Batch Mode (programa-principal)

Reads queries from a file and writes output to resultados/.

make run

Output files will be created as resultados/command1_output.txt, resultados/command2_output.txt, etc.

Interactive Mode (programa-interativo)

Launches a terminal interface where you can load a dataset and run queries interactively.

make runinterativo

Test Mode (programa-testes)

Compares program output against expected results, and reports timing and memory usage.

make runtestes

Memory Check (Valgrind)

make valgrind

Runs programa-principal under Valgrind with full leak checking and origin tracking.

Cleanup

make clean      # Remove object files and results
make fclean     # Also remove executables and docs
make rebuild    # fclean + full rebuild

Supported Queries

Query Description
1 <code> Airport summary (name, city, country, type, arrival/departure counts)
2 <N> [manufacturer] Top N aircraft by number of flights (optional manufacturer filter)
3 <start_date> <end_date> Airport with most departures in a date range
4 [begin_date end_date] Passenger who spent the most time in the weekly top 10 spenders
5 <N> Top N airlines by average delay (Delayed flights only)
6 <nationality> Most common destination airport for passengers of a given nationality

Append S to any query number to use = as the field separator instead of ;.

Documentation

Generate and view Doxygen HTML docs:

make doc        # Generate docs into docs/
make doc-view   # Open docs in browser
make doc-clean  # Remove generated docs

All public interfaces in include/ are documented with @brief, @param, and @return tags following Doxygen conventions.

Report

The report is in Portuguese and was written in Typst.

Authors

  • Gabriel Faria
  • Ricardo Rodrigues
  • Rui Gomes

About

Flight Management System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors