Giter Club home page Giter Club logo

SEKHAR PASEM's Projects

votingsystem icon votingsystem

Problem Statement :- Indian Government wants you to create a Java solution for managing the voting on motions once debate has concluded in the parliament. The system you create must accept votes (For or Against) on a specified motion and determine whether motion is pass or fail. Conditions :- 1. No votes can be accepted upon a motion until it is opened for voting. 2. When a motion is closed for voting, a result is returned that describes whether the motion passed or failed The number of votes for and against The time that voting opened and closed 3. A motion cannot be closed for voting less than 15 minutes after it was opened. 4. No voter can vote more than once on the same motion. 5. The maximum votes that can be received on a motion is 51. 6. If voting is a tie, then an attempt to close the motion for voting will cause it to enter a special "tied" state. 7. In the "tied" state, the speaker of the parliament is the only person allowed to vote. Once the speaker votes, the motion is automatically closed. 8. The speaker is not allowed to vote except when voting has entered the "tied" state. 9. If the speaker is not available to vote, then voting can be forced to the closed state which causes the motion to fail. Implementation Details :- 1. Expose a rest api to start a new motion. Only speaker should have access to start a new motion. 2. Expose a rest api to accept vote of a user (For or Against). 2. Expose a rest api to get the current state of a motion at any time (Not Started, In progress, Completed, Tied, Void). 3. Expose a rest api to get the results of a motion (The number of votes for and against, and the time that voting opened and closed). 4. Write unit test cases to validate the above conditions. Note :- The solution will be evaluated on following parameters. Object Oriented Design aspects of the solution. Overall coding practices. Working code covering the above conditions. You must include a brief explanation of your design, restrictions and assumptions in a README file.

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.