Post

Belgium street tool C# exam

Introduction

During my first year of college I had to make a project for a course called “Labo 3”. The project consisted of 3 tools

  • Tool 1: We had been given a zip file with CSV files in it. The CSV files contained data about the streets in Belgium with segments and points. The tool would read the CSV files, Do some calculations and write the data parsed to a new set of CSV files. Finally a report would be generated and an example can be found below.
  • Tool 2: Would use the data from the CSV files and write it to a database
  • Tool 3: A console application with the abiltiy to do some queries on the database for example: “Give me all the streets in the city of Ghent, How many streets are there in the city of Ghent, How many streets are there in the city of Ghent that are longer than 100 meters”

please note that the tools use dutch for comments and variable names and I offer no warennty that the code is correct or that it will work, the code is provided as is.

Source code: Github

Tool 1

The report generated by the tool looked like this. Each line in the report represents a city and the amount of streets in that city and the total length of all the streets in that city. For example the first line in the report says that there are 123 streets in the city of Aartselaar and the total length of all the streets is 72874,92m, the shortest street is 64,37m and the longest street is 6185,23m

The full report can be found here: rapport.txt

Tool 2

Not much to say about this tool, it just reads the CSV files and writes the data to a database. sqlserver was used as the database.

Tool 3

The CLI application had the following options

in the following image we will query the database for all the streets named Dorpstraat

This post is licensed under CC BY 4.0 by the author.