Simple Java code with JUnit tests for developing a voting system
$10-30 USD
Chiuso
Pubblicato più di 5 anni fa
$10-30 USD
Pagato al completamento
Imagine that you have been selected by the United States Senate to create a Java solution for managing the voting on
motions once debate has concluded on the senate floor.
The system you create must accept votes on a specified motion, tabulate Yeas and Nays and determine
whether motions pass or fail.
No votes can be accepted upon a motion until it is opened for voting.
When a motion is closed for voting, a result is returned that describes
o whether the motion passed or failed
o the number of votes for and against
o the time that voting opened and closed
A motion cannot be closed for voting less than 15 minutes after it was opened.
No voter can vote more than once on the same motion.
The maximum votes that can be received on a motion is 101.
If voting is a tie, then an attempt to close the motion for voting will cause it to enter a special
“tied” state.
o In the “tied” state, the Vice-president of the United States is the only person allowed to
vote. Once the VP votes, the motion is automatically closed.
o The VP is not allowed to vote except when voting has entered the “tied” state.
o If the VP is not available to vote, then voting can be forced to the closed state which
causes the motion to fail.
The system must support a query to discover the current state of a motion.
Requirements:
To successfully complete the assignment, follow these instructions:
1. Write Java classes that meet all requirements
2. Write JUnit tests to verify all requirements
3. DO NOT write any UI code or command-line UI code (no print statements), no persistence code
and no authentication code
4. DO NOT make use of any framework or open source library other than JUnit
5. Clean, readable and maintainable code is key
First of all, I really appreciate that you have mentioned your requirements so clearly.
I am full stack java developer having more than five years of experience in software development. I have completed projects in short duration and within limited budget. My freelancer profile reviews tells enough aboit my work. Trust me I will not disappoint you.