What concept does the above sample code demonstrate?

internal class Piston {}
internal class Engine
{
private Piston[] myPistons = new Piston[4];
public bool Ignition() {
//some code
}
}
public class Car
{
private Engine myEngine = new Engine();
public void Start()
{
//put in keys etc..
if (myEngine.Ignition()) {
//some more code

}
}
}

 Posted by Muhilan on 12/7/2009 | Category: ASP.NET Interview questions | Views: 14937
Select from following answers:
  1. Delegation
  2. Composition
  3. Polymorphism
  4. Combination
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Muhilan