GithubHelp home page GithubHelp logo

make-me-oo's Introduction

The intention of Shivam was to write a solution for the following two

  • Find distance between two points
  • Find direction (angle) between two points in Radians.

He did try to implement using OOPs but that was not completely OOPs because 'Point' class had only properties and no behaviour, 'DistanceAndDirectionCalculator' class had only behaviors and no property. There was no data binding in either of the classes.

The properties on the 'Point' class where not final and they were initialised using setters which means that the data on the properties could be changed on the fly, which breaks the contract.

The four main principles:-

  • Solution should pass the test.
  • Solution should reveal intention.
  • There is no duplication in solution.
  • Solution proposed should have fewer elements.

The solution proposed by shivam does cover the first three principles but the solution doesn’t have the fewer elements.

Our goal is to make the solution cover all the four principles also without loosing OOPs

make-me-oo's People

Contributors

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