Esempio n. 1
0
        static void Main(string[] args)
        {
            var listOfSharpies = new SharpieSet();
            var first          = new Sharpie("red", 55);
            var second         = new Sharpie("green", 50);
            var third          = new Sharpie("blue", 15);
            var fourth         = new Sharpie("black", 15);

            listOfSharpies.AddSharpie(first);
            listOfSharpies.AddSharpie(second);
            listOfSharpies.AddSharpie(third);
            listOfSharpies.AddSharpie(fourth);


            first.Use();
            first.Use();

            listOfSharpies.HowMany();



            Console.WriteLine(listOfSharpies.CountUsable());

            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Sharpie pencil = new Sharpie("red", 5);
            Sharpie tuzka  = new Sharpie("blue", 5);
            Sharpie pero   = new Sharpie("black", 5);

            SharpieSet psaciSouprava = new SharpieSet();

            psaciSouprava.Add(pencil);
            psaciSouprava.Add(tuzka);
            psaciSouprava.Add(pero);

            pero.Use();
            tuzka.Use();
            psaciSouprava.RemoveTrash();

            psaciSouprava.CountUsable();
            Console.WriteLine(psaciSouprava.GetCount());
        }