Thanks for taking the time to download this refactoring exercise.
This solution contains three classes used by an imaginary bicycle distributor to produce order receipts and some unit tests to prove that everything works.
Pretend this code is part of a more extensive software system and you are given responsibility for it.
Pick two of the three options below to refactor the code for:
- More bikes at new prices
- Different discount codes and percentages
- Additional receipt formats.
If you refactor all three, we'll judge you based on the best two that you do.
Refactor the code so that it can survive an onslaught of the upcoming changes, you're confident it works, and you're comfortable the next engineer will quickly understand how to work on it.
Be pragmatic in your refactoring. Don't use something fancy if you feel it's not needed.
Zip up your project (remove .vs, obj, bin, TestResults folders) and submit it with your resume. Don't do a PR/Fork as everyone else would see your work and could copy it.
If we love your refactoring and your resume is legit, we'll move to the next step. This might seem like a lot of hoops to jump through, but it's way better than hiring someone who answers trivia questions in an interview well but can't code worth a damn.
You will need Visual Studio to build and run tests. Minimum version is 2017 Express edition. This can be downloaded freely at https://visualstudio.microsoft.com/vs/express/
Tutorials on running tests can be found at https://docs.microsoft.com/en-us/visualstudio/test/getting-started-with-unit-testing?view=vs-2019