using System;
using System.Collections.Generic;
using System.Text;

namespace Schnittstelle 
{

   class Pencil : ICreated
   {
      private Boolean isdown;       // pencil status
      private DateTime created;     // Zeitpunkt der Objekterstellung

      /// <summary>
      /// Default Constructor
      /// </summary>
      public Pencil()
      {
         isdown = false;
         this.created = DateTime.Now;
      }

      /// <summary>
      /// Bring down pencil.
      /// </summary>
      public void Down()
      {
         isdown = true;
      }

      /// <summary>
      /// Lift pencil
      /// </summary>
      public void Up()
      {
         isdown = false;
      }

      /// <summary>
      /// Get current pencil status.
      /// </summary>
      /// <returns>True: pencil is down; False: pencil is up</returns>
      public Boolean IsDown { get { return isdown; } }
      
      /// <summary>
      /// Returns name of pencil.
      /// </summary>
      /// <returns></returns>
      public override string ToString()
      {
 	      return "Virtual Pencil";
      }

      #region ICreated Member

      public DateTime Created
      {
          get { return this.created; }
      }

      #endregion
   }
}
