Code Monkey home page Code Monkey logo

oop-concepts-assignment-4's Introduction

OOP-Concepts-Assignment-4

Ski Biathlon Standings

Write a software that takes as an input a CSV file where every entry represents the results of a biathlon athlete.

Based on the entries identify the first 3 places (Winner, Runner-up and Third Place).

The rules are simple, each athlete has a time-results for the entire skiing session, and 3 shooting range results.

Each shooting range has 5 shot results. For every missed shot the athlete obtains a 10 second penalty which affects the final time-result.

Final standings are based on the time-results that have been updated with the shooting range results.

CSV example:

11,Umar Jorgson,SK,30:27,xxxox,xxxxx,xxoxo

1,Jimmy Smiles,UK,29:15,xxoox,xooxo,xxxxo

27,Piotr Smitzer,CZ,30:10,xxxxx,xxxxx,xxxxx

Where the columns are:

AthleteNumber,AthleteName,CountryCode,SkiTimeResult(Minutes:Seconds),FirstShootingRange.SecondShooting,ThirShootingeRane

Every shooting range consists of 5 charactes, where x means hit, o mean miss. For every o there should be 10 seconds added to the final time.

Based on the above data the actual results are the following:

Winner - Piotr Smitzer 30:10 (30:10 + 0)

Runner-up - Jimmy Smiles 30:15 (29:15 + 60)

Third Place - Umar Jorgson 30:57 (30:27 + 30)

Task:

Write tests for the CSV parsing and the standing calculation
In the your tests you must not use real files. Make sure the CSVs are read from memory to keep the tests fast.
Use Comparator/Comaparable for sorting

oop-concepts-assignment-4's People

Contributors

alien1403 avatar

Watchers

 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.