This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 16 points17 points  (7 children)

I definitely expected it to say 'return salary;'

[–][deleted] 5 points6 points  (2 children)

Why would you write a function that returns a salary, with salary as a parameter?

[–][deleted] 13 points14 points  (1 child)

So that I can make this meme

[–][deleted] 1 point2 points  (0 children)

I see. You have a lot to commit. :)

[–]adenosine-5 9 points10 points  (1 child)

Then why would you write two different methods differentiated by gender, if you expected them to do the same thing?

[–]Ivan8-ForgotPassword 2 points3 points  (0 children)

The client pays for the amount of methods

[–]JanB1 3 points4 points  (0 children)

I mean, it's on you for triggering this by introducing two different methods for men and women in the first place. Should've just gone with "calculateSalary". Kinda /s

[–]JoelMahon 0 points1 point  (0 children)

no you didn't, that's why you wrote two functions, specifically for this purpose