Giter Site home page Giter Site logo

tax-trimmer's Introduction

Tax Trimmer

This project is part of the HR process in DevOcean

Usage

  • Fork/clone the repo.
  • You can open the solution file in the Visual Studio IDE and hit F5
  • Or, alternatively, build and launch TaxTrim.exe (The DevOcean.TaxTrim.Cli assembly)

The application will enter an input mode asking you for the gross amount.
Enter a positive, decimal number and hit Enter. The net amount will be displayed on the next line. Repeat the procedure as needed.

To return to the Windows Command Prompt press Ctrl+C.

NOTE: No error occurs if you enter a negative number for the gross amount and the net amount returned is 0.

Configuration

All the settings of the tax system are configurable through the appsettings.json file

Motivation

Why is the application developed the way it is?

  1. Over-engineering
    For the sake of the test, the app utilizies DI, Logging, error handling, and other good practices to demonstrate their usage.

  2. Enforce loose coupling
    Current assembly structure is as follows:
    Application code: DevOcean.TaxTrimmer.dll
    Application code tests: DevOcean.TaxTrimmer.Xunit.dll
    Hosting app: DevOcean.TaxTrimmer.Cli.exe

    Application code is isolated in a separate assembly so it coud be plugged in whatever other host app is necessary. E.g., Windows Service, ASP.NET Web App, etc.

  3. Logging
    It is merely a demonstration of the 1st OOP principle: Abstraction
    Besides, IMO there are too many log providers nowadays so hard coupling some in the application is a limitting experience.

Perhaps you have more questions about the coding? Shoot!

tax-trimmer's People

Contributors

bstoinev 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.