public void setupPartyList() { peanut = new dog("peanut", "bichon"); fifi = new dog("fifi", "poodle"); clarence = new dog("clarence", "german"); gizelle = new dog("gizelle", "buorder collie"); lulu = new dog("lulu", "shitzu"); 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 = gizelle; gizelle.prev_dog = clarence; gizelle.next_dog = lulu; lulu.prev_dog = gizelle; lulu.next_dog = roy; roy.prev_dog = lulu; roy.next_dog = null; head = peanut; tail = roy; }
public void setupPartyList() { peanut = new dog("peanut", "bichon"); fifi = new dog("fifi", "poodle"); clarence = new dog("Clarence", "German Sheppard"); roy = new dog("roy", "beagle"); Giselle = new dog("Giselle", "Border Collie"); Lulu = new dog("Lulu", "Shitzu"); peanut.previousdog = null; peanut.nextdog = fifi; fifi.previousdog = peanut; fifi.nextdog = clarence; clarence.previousdog = fifi; clarence.nextdog = Giselle; Giselle.previousdog = clarence; Giselle.nextdog = Lulu; Lulu.previousdog = Giselle; Lulu.nextdog = roy; roy.previousdog = Lulu; roy.nextdog = null; head = peanut; tail = roy; }
public string printPartyList_reverse() { string inviteList = "---"; temp = tail; while (temp.previousdog != null) { inviteList += temp.dog_name + "*---"; temp = temp.previousdog; } inviteList += temp.dog_name + "*---"; return(inviteList); }
public string printPartyList() { string inviteList = "---"; temp = head; while (temp.nextdog != null) { inviteList += temp.dog_name + "*---"; temp = temp.nextdog; } inviteList += temp.dog_name + "*---"; return(inviteList); }
public string reverseprintPartyList() { string inviteList = "*--"; temporary = tail; while (temporary.prev_dog != null) { 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) { inviteList += temporary.dog_name + " * --- * "; temporary = temporary.next_dog; } inviteList += temporary.dog_name + " * --- * "; return(inviteList); }