Yeah, I get that. If/when I make a part 2, I'm definitely going to put more thought into other keyboards and key mappings.
Thanks for your feedback. I updated the Kata description to reflect your comment.
Sounds good. Thanks again for your feedback.
This comment is hidden because it contains spoiler information about the solution
I definitely want to have them everywhere. Let me look into why they are not showing up.
Great feedback, thank you!
I added a line about using the EN-US keyboard layout, specifically qwerty, to the description.
You're absolutely right about the variable name; changed it to text.
I also forgot to include the global parameters to check for membership in the test suite. I thought that would have been caught when I did validate test, but I guess not.
I missed that in the setup code, it was correct everywhere else :p
So, short and sweet, given a current age, a withdrawal rate, and a lump sum expected in retirement for each individual, we are answering the yes or no question if they can retire in year. Given that the current year is 2018, we need to calculate the future age of the individual when they decide to retire in year. We also know the market will affect the lump sum the person has once they retire. The market will go up or down each month according to the formula new=old*(1+market_rate_function(month,year)/100). So each month the lump_sum will either increase or decrease and the lump_sum should be updated each month to reflect that. At the beginning of each year, the individual withdrawls withdrawal_rate percentage from the lump_sum. So in order for the function to return true, the Person, based on age, withdrawal rate, and lump sum, will be able to retire in year if the money will not run out by the time the individual would turn 120 (it is very unlikely someone will outlive their money in this case). Does that help? I won't put a spoiler flag on this because I seemed to have explained this really poorly.
Alright, I think I cleared things up. I fixed the description to include more information and I decided to give the market_rate_function rather than try and lead to the completely, arbitrary function I am using.
To answer you here as well as the description, the withdrawal rate is how much of the lump sum is taken out per year to live on, like a salary, see this article if you're curious (https://www.investopedia.com/terms/f/four-percent-rule.asp). The idea here is that the lump sum is about 25x the salary you want to take each year so that 4% of the lump sum is equal to your desired yearly take-home pay.
The retirement age is not set, it's based off which year you want to retire and the program/Person class should calculate the age based off that year.
You were right about the market_rate_function, it is supposed to be static and like I said above, I decided to give it instead of try and make people guess it, since it's my own design and attempt at "matching" market fluctuation.
No offense taken, I'll go back and update and respond again when it's done.
Thanks for the feedback!
Woop Woop! I absolutely don't mind and thank you so much for approving and contributing!
My bad! I meant it as a suggestion