Skip to content

KBumGit/Ticket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ticket machine project

Library for download list of stations and give interface for UI for select one based on typed letters

Full documentation is in refman.pdf and can be regenerated with doxygen

Goals

The main goal is return as fast as possible acceptable chars for complete search and possible stations based on input query.

Result can be used to get price of ticket by using station code and buy selected choice. Pricing should be implemented in another projects as is no information and requirements for that.

Requirements:

  1. Typing a search string will return:
    1. All stations that start with the search string.
    2. All valid next characters for each matched station.
  2. Space is a valid character when returning a list of next characters.
  3. The service response will be used for the machine UI and for the routing and pricing purposes.

Operational requirements:

  1. Runtime speed is very important, loading time is not.

  2. Make no assumptions about the data source in real life.

  3. Expected Scenarios:

    • Given a list of stations DARTFORD, DARTON, TOWER HILL, DERBY
      1. When input DART
      2. Then should return:
        • The characters of F O
        • The stations DARTFORD, DARTON
    • Given a list of stations LIVERPOOL, LIVERPOOL LIME STREET, PADDINGTON
      1. When input LIVERPOOL
      2. Then should return:
        • The characters of ' ' (space)
        • The stations LIVERPOOL, LIVERPOOL LIME STREET
    • Given a list of stations EUSTON, LONDON BRIDGE, VICTORIA
      1. When input KINGS CROSS
      2. Then should return:
        • no next characters
        • no stations

    These scenarios are tested in project:

Others requirements

User can input only ASCII letters (A-Z) and space.

Example applications

In the projects TicketMachine.md and TicketMachine.WebApi.md there is an example application that uses a library for searching stations.

Used external libraries

Libraries what not come from Microsoft company:

Others:

  • NUnit (with NUnit3TestAdapter, NUnit.Analyzer)
  • Moq (with Castle.Core)
  • coverlet.collector

Additional tools

Documentation generation

Documentation are generated by doxygen and plantuml:

For doxygen there is configuration file: doxygen.conf For simplify process there is script written in bash: make_doc.sh

Status

Work is split into two stages:

  • stage 1 - most important thinks to make in given time
  • stage 2 - future improvements

Stage 1 [DONE]

Status Task
[DONE] Working code
[DONE] Documentation:
* Function and code description
* Graphs
* Project description
[DONE] Tests

Stage 2 (future improvements)

Tasks:

  • Add logger (NLog)
  • Tests on big data
  • Improve speed:
    • Add letters indexing
    • Check other search algorithm
      • Check if mixed algorithms can improve speed
        • Search params by genetic or linear algorithm
    • Retest
  • Check different memory access and allocating

Ticket Machine Licence

Licence MIT is in file LICENSE.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published