Beispiel #1
0
        public string printPartyList()
        {
            string inviteList = "*--";

            temporary = head;
            while (temporary.next_dog != null)
            {
                inviteList += temporary.dog_name + " * --- * ";
            }

            return(inviteList);
        }
Beispiel #2
0
        public void setupPartyList()
        {
            peanut   = new dog("Peanut", "Bichon");
            fifi     = new dog("Fifi", "Poodle");
            clarence = new dog("Clarence", "German Sheppard");
            roy      = new dog("Roy", "Beagle");

            peanut.prev_dog   = null;
            peanut.next_dog   = fifi;
            fifi.prev_dog     = peanut;
            fifi.next_dog     = clarence;
            clarence.prev_dog = fifi;
            clarence.next_dog = roy;
            roy.prev_dog      = clarence;
            roy.next_dog      = null;
            head = peanut;
            tail = roy;
        }