reset password
Author Message
OhWhen
Posts: 14
Posted 19:56 Feb 06, 2020 |

Does anyone know how to print out the dialogue in order? To be more exact how are we supposed to bounce the data to print out in the toString method?

kknaur
Posts: 540
Posted 21:15 Feb 06, 2020 |

Remember that toString just builds a big long string that you return at the end.  With the dialog you can iterate over the array and add each line of speech to the output string one line at a time.

OhWhen
Posts: 14
Posted 21:20 Feb 06, 2020 |

So we run a for loop into the toString method?

kknaur
Posts: 540
Posted 21:40 Feb 06, 2020 |

Yup you can do that :)

OhWhen
Posts: 14
Posted 20:24 Feb 10, 2020 |

Hey Keenan, the getter method for the dialogue. Are we supposed to use a for loop or is it able to return the array by using, (return dialogue;).

kknaur
Posts: 540
Posted 20:51 Feb 10, 2020 |

No loops in that, just return a reference to the array.