public void setupPartyList() { peanut = new dog("peanut", "Bichon"); fifi = new dog("fifi", "Poodle"); clarance = new dog("Clarance", "German Sheppard"); lulu = new dog("Lulu", "Shitzu"); giselle = new dog("Giselle", "Border Collie"); roy = new dog("Roy", "Beagle"); peanut.prev_dog = null; peanut.next_dog = fifi; fifi.prev_dog = peanut; fifi.next_dog = clarance; clarance.prev_dog = fifi; clarance.next_dog = roy; giselle.prev_dog = clarance; giselle.next_dog = lulu; lulu.prev_dog = fifi; lulu.next_dog = roy; roy.prev_dog = lulu; roy.next_dog = null; head = peanut; tail = roy; }
public string printPartyList_reverce() { string inviteList = "*---"; temporary = tail; while (temporary.prev_dog != null) { ; } { Console.WriteLine(temporary.prev_dog.dog_name); inviteList += temporary.dog_name + "*---*"; temporary = temporary.prev_dog; } inviteList += temporary.dog_name + "*---*"; return(inviteList); }
public string printPartyList() { string inviteList = "*---"; temporary = head; while (temporary.next_dog != null) { ; } { Console.WriteLine(temporary.next_dog.dog_name); inviteList += temporary.dog_name + "*---*"; temporary = temporary.next_dog; } inviteList += temporary.dog_name + "*---*"; return(inviteList); }