Showing posts with label interfaces. Show all posts
Showing posts with label interfaces. Show all posts

Wednesday, May 23, 2007

Implementing interfaces (IRespondable)

The most important aspect of baby development is the correct and timely implementation of various interfaces in the Human.Babies namespace.

This week David implemented another useful interface. Finally this enables us to have meaningful conversation with our flagship product. The interface contract is quite simple:

namespace Human.Babies
{
public interface IRespondable
{
bool GetResponse(string question);
}
}

Unfortunately David’s implementation is even simpler:
public bool GetResponse(string question)
{
return false;
}

Sunday, July 30, 2006

Implementing interfaces (IThrow)

The most important aspect of baby development is the correct and timely implementation of various interfaces in the Human.Babies namespace.

David has just implemented the IThrow interface today.

namespace Human.Babies
{
public interface IThrow
{
void Throw();
}
}


Note that the method accepts no parameters. There is no way to specify the direction, force or the object of the operation.

Wednesday, March 29, 2006

Implementing interfaces (ITurnable)

The most important aspect of baby development is the correct and timely implementation of various interfaces in the Human.Babies namespace.

David has just implemented the ITurnable interface today.

namespace Human.Babies
{
public interface ITurnable
{
void TurnLeft();
void TurnRight();
}
}


Through the magic of abstract classes and inheritance we also get Turning and Turned events to bind on mom. She loves it and I recorded the first build on cam. You might have noticed I haven’t bloged any of the previous interfaces. Eg. yesterday’s post was a result of the IGrabber.GrabObject method. That is because they we’re already implemented at birth. Anyway, here’s a short list:
  • ICute
  • IGrabber
  • IKicker
  • IScreamer
  • IDemandable
  • ILovable