Daniel Andres wrote:My post is lengthy but I only have one question stated further below. Please do help!
Daniel Andres wrote:Could you run the code please so that you can see the error message I get?
Daniel Andres wrote:
Please enter a Painter:
giotto
Museum@55f96302
nullMuseum@55f96302
------------------------------------------------------------------------------------
I have fixed and added code but my main issue remains. As you can see, museum from museumsUsed is not displaying the correct results.
Junilu Lacar wrote:
Daniel Andres wrote:
Please enter a Painter:
giotto
Museum@55f96302
nullMuseum@55f96302
------------------------------------------------------------------------------------
I have fixed and added code but my main issue remains. As you can see, museum from museumsUsed is not displaying the correct results.
By "not displaying the correct results" are you referring to the part that I have bolded?
Daniel Andres wrote:
Yes, I have seen that error before when working with regular arrays but I do not remember why this happens.
Junilu Lacar wrote:By the way, there are other names you can consider using besides createPaintings(Scanner source). There are also other designs you can consider:
Another reasonable method signature would be
Those names at least express what is happening in the method.
Try to figure out how you would call a method that is designed this way.
Daniel Andres wrote:First off, I would like to THANK YOU immensely for such detailed response and tips on the way I have added code to the program.
I think the reason we need to spread the manipulation of data between classes is to practice on how to do so and how it works.
Thank you for the tips on proper naming of variables and parameters! I shall continue now with the program...
I wrote:If It were me, I would have one separate class that was responsible for reading and interpreting a museum data file. It would have ...
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |