Giter Club home page Giter Club logo

hotelreservation's Introduction

Hotel Reservation System

This application allows a customer or hotel employee to calculate the cheapest hotel to stay during specified dates.

Folders structure

The application is divided in three folders:

  • doc: containing images that compose this documentation
  • hotel_system: main folder with the application files
    • __init__.py: package directory definition
    • __main__.py: contains the main() function that will solve the problem
    • customer.py: class that represents a Customer
    • file_handler.py: file with auxiliary methods to handle the input files
    • hotel_chain.py: class that represents a HotelChain
    • hotel.py: class that represents a Hotel
    • reservation.py: class that represents a Reservation
  • tests: folder with the tests written and some test files

Folders structure

Solution design

The solution was designed considering OO programming principles. There are four classes in the design:

  • Hotel: represents a hotel in the system
  • Customer: represents a customer in the system
  • Reservation: represents a reservation that a customer could make for a specific hotel
  • HotelChain: represents a chain of multiple hotels

The picture above shows the class diagram with all attributes and methods for each class:

Class diagram

How to run

To run the application with a specific file:

make run FILE=/path/to/file/

To run all the tests:

make test

To clean the executables:

make clean

Examples

The figure above shows some test examples running with this solution. These test files are in the path tests/test_files

Examples

Tests

There are 19 automatized tests written for this application. To run them use the command make test

Examples

hotelreservation's People

Watchers

 avatar  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.