Individual project - a brief analysis of metro project

Individual project - a brief analysis of metro project

demand analysis

  1. Storage format circuit design
  2. Program can parse files subway
  3. By subway line query the site of the line
  4. Discover the shortest path between two sites
  5. Parse command line command
  6. test

    Realization of ideas

  • Each station and subway lines, a plurality of circuit sites, a site may have a plurality of lines, a picture can be kept down.
  • Save the file format Subway: Line station +
  • Start command line:
    java subway -map subway.txt
  • According subway station line inquiries:
    java subway -a 1号线 -map subway.txt -o station.txt
  • Discover the best path based on two sites:
    java subway -b 洪湖里 复兴路 -map subway.txt -o routine.txt
  • Output File Format

    3
    Honghuli
    West Station
    Line 6
    Fuxing Road

    test

  • Honghuli - Liu Yuan

    Line 1
    Honghuli
    thrifty Road
    Benxi Road
    Winery
    West Cross embankment
    Liu Yuan

  • Honghuli - Fuxing Road

    Line 1
    Honghuli
    West Station
    Line 6
    Fuxing Road

  • West Railway Station - Dawangzhuang

    Line 1
    West Point
    northwest
    southwest corner
    Line 2
    Drum
    southeast corner
    Jianguo Road
    Tianjin Station
    Line 9
    Dawangzhuang

  • Error cases: no change site
    can not reach the site change

    to sum up:

  • The private job will be written in Java but mastery of Java is not enough to learn a lot of knowledge, the main difficulty is to consider the transfer between the two sites.

Guess you like

Origin www.cnblogs.com/c-zq/p/11566230.html