book says that interfaces specify behavior without implementing it. That doesn't really explain much to me.

If you could please look at what I've done and tell me if I am using the interface properly, I would really appreciate it. What I've done seems to work. But I don't understand why I would want to use an interface. It seems to me that it's some way to pass objects around and use methods easier? But I am not sure since it seems I am repeating methods anyways.

If you think it could be done in a better way, I would love to know how. But my main hope is that I am doing this correctly and could use some help with understanding how to use an interface.

Thanks so much in advance.
VB Code:
  1. class Arm : IBendable
  2.  
  3. {
  4.  
  5. public Arm()
  6.  
  7. {
  8.  
  9.  
  10. }
  11.  
  12. public void Raise()
  13.  
  14. {
  15.  
  16. Console.WriteLine("Raising arm up.");
  17.  
  18. }
  19.  
  20. public void Bend()
  21.  
  22. {
  23.  
  24. this.Raise();
  25.  
  26. }
  27.  
  28. }
VB Code:
  1. class Spoon : IBendable
  2.  
  3. {
  4.  
  5. public Spoon()
  6.  
  7. {
  8.  
  9. }
  10.  
  11. public void Eat()
  12.  
  13. {
  14.  
  15. Console.WriteLine("Eating from the spoon.");
  16.  
  17. }
  18.  
  19. public void Bend()
  20.  
  21. {
  22.  
  23. this.Eat();
  24.  
  25. }
  26.  
  27. }
VB Code:
  1. namespace Prog6_18
  2.  
  3. {
  4.  
  5. public interface IBendable
  6.  
  7. {
  8.  
  9. // Any class that implements the IShape interface
  10.  
  11. // must define the following methods:
  12.  
  13. void Bend();
  14.  
  15. }
  16.  
  17. }
VB Code:
  1. class Prog6_18
  2.  
  3. {
  4.  
  5. static void Main(string[] args)
  6.  
  7. {
  8.  
  9. Spoon childsSpoon = new Spoon();
  10.  
  11. Arm childsArm = new Arm();
  12.  
  13. EatFood(childsArm);
  14.  
  15. EatFood(childsSpoon);
  16.  
  17. }
  18.  
  19. public static void EatFood(IBendable a)
  20.  
  21. {
  22.  
  23. a.Bend();
  24.  
  25. }
  26.  
  27. }