Beispiel #1
0
        static void Main(string[] args)
        {
            Notebook myNotebook = new Notebook();
            Note     page1      = new Note("podsjetnik", "nemoj zaboraviti postaviti link gitHuba na stranicu kolegija");
            Note     page2      = new Note("zubar", "imas zakazano kod zubara petak 20.5.2020");

            myNotebook.AddNote(page1);
            myNotebook.AddNote(page2);
            Console.WriteLine("broj stranica je: {0}", myNotebook.Count);
            myNotebook.RemoveNote(page2);
            Console.WriteLine("broj stranica je: {0}", myNotebook.Count);
            myNotebook.Clear();
            Console.WriteLine("broj stranica je: {0}", myNotebook.Count);
            Console.Read();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Note     note1    = new Note("Cars", "BMW, OPEL, VW, Porsche");
            Note     note2    = new Note("Bikes", "Yammaha, Honda, KTM, Aprilia");
            Note     note3    = new Note("Tyres", "Tigar, Fulda, Sava,Dunlop");
            Notebook notebook = new Notebook();

            notebook.AddNote(note1);
            notebook.AddNote(note2);
            notebook.AddNote(note3);
            notebook.RemoveNote(note2);

            IAbstractIterator notebookIterator = notebook.GetIterator();

            while (!notebookIterator.IsDone)
            {
                notebookIterator.Current.Show();
                notebookIterator.Next();
            }
        }