Interview Test 2015

Keywords: Interview Test, Object Oriented Programming, C#
Publish Date: 8/11/2015
Description: A Race Track C# test for object oriented principles.

A while back my company was trying to find better ways to screen candidates for their programming skills and this race track programming test was created for that purpose. Very little instructions were given on purpose to see what candidates would come up with. It quickly became an in office competition with some very interesting discussions. The discussion that came up for me was regarding inheritance and when it should happen. My take on it was if inheritance can at all be avoided, then avoid it! In my opinion avoiding inheritance makes for less tightly coupled program modules.

It should be noted that my app was not close to being the most impressive. Some masterminds made up a proper formula for the winning race car as well as designed a UI that actually showed the cars racing. Pretty cool!

Here are the stated rules...

Version 1.0

Create a C# program that simulates a drag race using at a minimum of the following three classes, with configurable parameters.  Use object oriented principles where applicable.

  1. Drivers – Create a class that represents a driver of a car.  At a minimum they should have a name, weight, and a skill level of driving.
  2. Race Cars – Create a class that represents a race car.  At a minimum a race car should have a weight, horsepower, top speed, and a driver.
  3. Track – Create a class that represents a track.  The track needs to allow two race cars to race.


Version 2.0

To make this exercise a little more real-world, the product owner has identified some areas to refine for version 2.0 to bring a more real-world experience to the user.


Should Support 3 Classes of Drag Race Cars (which have tight regulations)

  1. Top Fuel
    1. Weight Range: 2300-2600
    2. HP Range: 8500-10000
    3. Track Length: 1000 ft.
  2. Funny Car
    1. Weight Range: 2100-2600
    2. HP Range: 7000-9000
    3. Track Length: 1/4 mile
  3. Pro Stock
    1. Weight Range: 2350-2700
    2. HP Range: 900-1300
    3. Track Length: 1/4 mile

Try out a functional version of it

Or download a proper vs2013 version of it without the crazy formatting of .net fiddle.

Comments (0):

Leave a Comment:

    Captcha Challenge