Google Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: In-Person
Last month. I think they are still asking OOP design questions, so is Amazon actually.
Strange. May be my recruiter did not have the correct information then. Thanks for the clarification btw. And apologies for commenting like this. I just wanted to make sure what I was told was correct and I wanted everybody to be aware of it. Apparently, I was given incorrect information. Thanks.
It's all good. I think it's still very common for oop design questions to be asked during interviews, although I think a oop design for a chess game is a joke since not everybody knows how to play chess. I havent played chess once in my life.
This is what I'm talking about:
class Piece():
def __init__(self, x, y):
self.x = x
self.y = y
def make_move(self, new_x, new_y):
pass
class Queen(Piece):
def make_move(self, new_x, new_y):
#specific move validation for Queen
if self.x - new_x == 0 or self.y - new_y == 0 or abs(self.x - new_x) == abs(self.y - new_y):
self.x = new_x
self.y = new_y
return True
else:
return False
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Hey Google told me they stopped asking design questions a few weeks before my interview. My interview was in 09/2013. When was this question asked?
- BP January 30, 2014I was not asked any design questions in my interview either. Btw, I applied for the Software Engineer in Test position and was offered the Test Engineer position. I did not accept.