I had a written test before an interview. I have finished the test then their IT manager replied that my code was not good.
just want to know do you have any improvement suggestions of my answers?
written test file
You would fall down for poor formatting because the code lines are too long. You would fall down for incorrect use of the main() method, and you would fall down for not using object orientation in the first class; everything is marked static.
Zachary Griggs wrote:
Functionality of this line is unclear.
Not only unclear... it's also dividing two int values and then converting it to Double. This is probably not quite what was needed: for example if you divide 1 / 2 and then convert to double, you get zero. Whereas you probably wanted to get 0.5 instead. You need to cast either the dividend or the divisor to double before the division takes place.
posted 4 days ago
Zachary Griggs wrote:. . . a good idea if you had time to do so. . . .
Interviewers assume that the applicants will all take a lot of trouble about the submission and will all make sure to take the time to create a polished product. If the idea is to reduce fifty applications to five to interview, the reviewing process will be very fast, and ruthless. You see the iffy declaration in line 3 and the very long line 57 [or 80], and you stop reading.
Add “[or 80]”
I don't like that guy. The tiny ad agrees with me.
Two software engineers solve most of the world's problems in one K&R sized book