reset password
Author Message
gfalcon2
Posts: 3
Posted 15:33 Oct 15, 2015 |

The problem states to make an instance of Address in the Person class, but never says what to do with this object.

I assume you want us print the address from the person object e.g. person.getAddress().print(). in the main method.

Also the toString(). method using void does not let me System.out.print for some reason so I changed it to print(). As the problem said to print from this method.

msargent
Posts: 519
Posted 15:35 Oct 15, 2015 |

Your assumption is correct, though don't make a new Address in your Person class -- do that in the main method of the test class.

toString() should return a String --- it shouldn't be void.