Git Product home page Git Product logo

codekata's Introduction

CodeKata

Overview

This is an application developed using .Net Core, version 3.1.

This project can be run by executing the following code inside the folder Codekata dotnet run

Main Usage

The code will process an input file.

Each line in the input file will start with a command. There are two possible commands. The first command is Driver, which will register a new Driver in the app. Example: Driver Dan The second command is Trip, which will record a trip attributed to a driver. The line will be space delimited with the following fields: the command (Trip), driver name, start time, stop time, miles driven. Times will be given in the format of hours:minutes. We'll use a 24-hour clock and will assume that drivers never drive past midnight (the start time will always be before the end time). Example: Trip Dan 07:15 07:45 17.3 Discard any trips that average a speed of less than 5 mph or greater than 100 mph. Generate a report containing each driver with total miles driven and average speed. Sort the output by most miles driven to least. Round miles and miles per hour to the nearest integer.

Example input:

Driver Dan

Driver Alex

Driver Bob

Trip Dan 07:15 07:45 17.3

Trip Dan 06:12 06:32 21.8

Trip Alex 12:01 13:16 42.0

Expected output:

Alex: 42 miles @ 34 mph

Dan: 39 miles @ 47 mph

Bob: 0 miles

codekata's People

Contributors

nissimbet avatar thanh81 avatar

Watchers

James Cloos 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.