- Install Java 17
- Fork Repository to your GitHub
- Download IntelliJ IDEA (If you want you can use IDE of your choice)
Like nothing is perfect, every piece of code is more or less likely to have some bugs or at least some space for improvement. Responsibility of every developer and especially QA engineers is to minimize the probability that some code has bugs. There are plenty of ways to make it happen, but here we are going to simulate only some of them. It is known that the later the phase of development is, the more expensive fixing a bug becomes. It would be perfect if we could find all bugs before any execution testing. It sounds simple, just look at the code and detect mistakes, but it is harder than it looks like. We are going to simulate and practice this kind of debugging.
Since we are in the field of live sport games, there are always a lot of events that are going on in our game. In this task you have one little event. This event is a guessing game, the player gets to pick one option out of multiple options and if he picks the right one he gets a reward, if not he is out of the game.
This project consists of two parts:
- First part is the FindThePrize.java class where all the logic of the game is written. Here you need to analyze code, find bugs and fix them. Also be free to modify code so it is more efficient and easier to unit test. In comments you can discuss code in general.
- Second part is the TestFindThePrize.java class where you need to write unit tests for main game logic. Think of crucial tests and find the minimum number of unit tests that you think is necessary to say that code is safely tested.
You should send your answers to this email [email protected] with a link to the forked Github project. We will go through git history to review your changes and evaluate code. (Hint: With submitting this project, you can also make your own implementation for this event that can also be unit tested)
Good luck!
Open until November 28 , end of day.