Answered You can hire a professional tutor to get the answer.

QUESTION

Write the constructor (this gets a little complex). The constructor should: Take two suings as parameters. One string will be the name of the file...

I have done some parts before this but now I am unsure how to make his constructor. Can you please help with the java program for the above.

I have an existing Catalogue array called Country[], a Set of strings called continents and a Map <String, String> for the Dictionary. I have also attached the two Things to write and things to read java files as you will need it for part iii and iv

Please refer to the above 3 in your code if you can thank you

  • Attachment 1
  • Attachment 2
  • Attachment 3
Write the constructor (this gets a little complex). The constructor should: i. ii. iii. iv. Take two suings as parameters. One string will be the name of the file containing the country information, and the other will be the name of the file containing thecontinent information. Instantiate the instance variables. Read the country file (with a ThingToReadFile object) one line at a time, parsethe text, create a Country object based on the text, and then add the Country tothe catalogue with a method called addCatalogue (more on this below). Be sureto close the file when done. Read the continent file (with a ThingToReadFile object) one line at a time, parse the text, and then add the details to cDict and continents. Be sure to close the filewhen done.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question