9 ms·
> We are still looking I’m not quite sure I followed your post, but if I did, you’re still looking because you’re being obnoxious. If you asked somebody to wr
by commandlinefan 7y ago
> We are still looking
I’m not quite sure I followed your post, but if I did, you’re still looking because you’re being obnoxious. If you asked somebody to write a class that represents an account with a balance/negative getter _in a job interview setting_, the code you posted looks fairly reasonable (assuming it’s written in a programming language that that compiles in - it’s obviously not Java, C# maybe?). I wouldn’t make “isNegative” a property; I’d replace it with “public bool isNegative { return balance < 0; }”, but otherwise, without any further instruction, again in an artificial job interview setting, without you clarifying what you’re looking for, there’s nothing wrong with this. Or are you pushing back on the “write a command line app” part when there’s no CLI attached? Because if you actually wanted one, you need to provide a lot more context than “write a command line app” (should I be tracking multiple accounts? Should there be a command to create a new one, or is there just one with a starting balance for demo purposes?).