Beispiel #1
0
void Amoeba::PrintGrandChildren () {
	Amoeba* child = myYoungestChild;
	while (child != 0) {
		child->PrintChildren();
		child = child->myOlderSibling;
	}
}
Beispiel #2
0
void Amoeba::IndentHelp (string ind) {
  cout << ind << Name() << endl;
  Amoeba* child = myYoungestChild;
  while (child != 0) {
    child->IndentHelp(ind + "   ");
    child = child->myOlderSibling;
  }
}
Beispiel #3
0
void Amoeba::PrintDescendants(string indent){
    cout << indent << this->Name() << endl;
    Amoeba* child = myYoungestChild;
    while(child){
        child->PrintDescendants(indent + "    ");
        child = child->myOlderSibling;
    }
}
Beispiel #4
0
void Amoeba::PrintGrandChildren(){
    cout << "Here are my grandChildren: " <<endl;
    Amoeba* child = myYoungestChild;
    while (child){
        child->PrintChildren();
        child = child->myOlderSibling;
    }
}
Beispiel #5
0
void Amoeba::PrintChildren(){
    cout << "Here are my children: " << endl;
    Amoeba* child = myYoungestChild;
    while (child){
        cout << "Hello, I'm " << child->Name() << endl;
        child = child->myOlderSibling;
    }
}
Beispiel #6
0
void Amoeba::PrintChildren () {
	if (myYoungestChild == 0) {
		return;
	} else {
		Amoeba* child = myYoungestChild;
		while (child != 0) {
			cout << child->Name() << endl;
			child = child->myOlderSibling;
		}
	}
}
Beispiel #7
0
void Amoeba::PrintDescendants () {
  string ind = "";
  if (myYoungestChild == 0) {
    return;
  }
  else {
    Amoeba* child = myYoungestChild;
    while (child != 0) {
      child->IndentHelp(ind);
      child = child->myOlderSibling;
    }
  }
}