OOP Problems to use for Coding Tests during interv

2019-03-09 02:34发布

As a second interview I get people to sit down and write code...I try to make the problem really technology independent.

My programming problems that I have don't really exercise peoples OO abilities. I tend to try and keep the coding problem solvable within 2 hours ish. So, I've struggled to find a problem small enough and involved enough that it exposes peoples OO design skills.

Any suggestions?

标签: oop
9条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-03-09 03:00

Designing Social Security Application is something which I ask a lot of people during interviews.

The nice thing about this is everyone is aware of how it works and what things to keep track of. They also have to justify their design and this really helps me get inside their head :) (As there is lots of flexibility here)

Kind regards,

查看更多
爷的心禁止访问
3楼-- · 2019-03-09 03:02

How about some sort of simple GUI. It's got inheritance, overriding, possibly events. If you mean for them to actually implement as part of the test then you could hand them a blank windows-form with an OnPaint() and tell them to get to it.

查看更多
等我变得足够好
4楼-- · 2019-03-09 03:10

Whether or not people do some coding in the interview, I make it a point to ask this: Tell me about a problem you solved recently using object oriented programming. You'd be surprised how often people cannot answer that simple question. A lot of times I get a blank stare, or they say something like "what do you mean? I program in .NET, which is all object oriented."

查看更多
Summer. ? 凉城
5楼-- · 2019-03-09 03:11

This is a problem that I use with some trainings, looks simple but is tricky OOP-wise:

Create model classes that will properly represent the following constructs:

  1. Define a Shape object, where the object is any two dimensional figure, and has the following characteristics: a name, a perimeter, and a surface area.
  2. Define a Circle, retaining and accurately outputting the values of the aforementioned characteristics of a Shape.
  3. Define a Triangle. This time, the name of the triangle should take into account if it is equilateral (all 3 sides are the same length), isoceles (only 2 sides are the same length), or scalene (no 2 sides are the same).

You can go on and on with quadrelaterals (which include squares, rectangles, rhombi, etc) and other polygons.

The way that they would solve the above problems would reveal the people who understand OOP apart from those who don't.

查看更多
在下西门庆
6楼-- · 2019-03-09 03:16

You could do worse than ask them to design a MapReduce library with a single-process implementation. Will the interface still work for a distributed implementation? What's the exception-handling policy? Should there be special support for chaining MapReduce jobs in a pipeline? What's the interface to the inputs and outputs? How are inputs chunked up? Can different inputs in one job go to different mappers? What defaults are reasonable?

A good solution in Python takes about a page of code.

查看更多
SAY GOODBYE
7楼-- · 2019-03-09 03:21

I have used the FizzBuzz Programming Test. And shockingly can corroborate the claims made by the article. As a second follow up I have asked candidates to compute the angle(s) between the hands on an analog clock. We set up a laptop with VS 2008 installed and the stub in place. all they have to do is fill in the implementation.

I am always stunned at how poorly candidates do on these two questions. I really am.

查看更多
登录 后发表回答