Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A geography class is currently studying Europe, and the next test covers the capital cities. The test will be fill-in-the-blank questions. Each question will be

A geography class is currently studying Europe, and the next test covers the capital cities. The test will be fill-in-the-blank questions. Each question will be in one of the following two formats: Format 1: The capital city of is_____. Format 2: The capital city of _____ is . Where placeholders and are provided, and you must fill in the blanks. Here is a copy of your study sheet: Country Capital Country Capital Albania Tirana Liechtenstein Vaduz Andorra Andorra la Vella Lithuania Vilnius Armenia Yerevan Luxembourg Luxembourg Austria Vienna Macedonia Skopje Azerbaijan Baku Malta Valletta Belarus Minsk Moldova Chisinau Belgium Brussels Monaco Monaco Bosnia Herzegovina Sarajevo Montenegro Podgorica Bulgaria Sofia Netherlands Amsterdam Croatia Zagreb Norway Oslo Cyprus Nicosia Poland Warsaw Czech Republic Prague Portugal Lisbon Denmark Copenhagen Romania Bucharest Estonia Tallinn Russia Moscow Finland Helsinki San Marino San Marino France Paris Serbia Belgrade Georgia Tbilisi Slovakia Bratislava Germany Berlin Slovenia Ljubljana Greece Athens Spain Madrid Hungary Budapest Sweden Stockholm Iceland Reykjavik Switzerland Bern Ireland Dublin Turkey Ankara Italy Rome Ukraine Kiev Kazakhstan Astana United Kingdom London Kosovo Pristina Vatican City Vatican City Latvia Riga To skirt the opportunity of genuine learning, you decide to take advantage of your existing abilities and write a Java program to fill in the blanks. Input will be from a data file each in the format given in the description above. Blanks will consist of 5 consecutive underscore characters ('_'). Output will exactly mirror the input except that the blanks will be replaced with the correct country or capital names from the study sheet. All the countries/capitals may or may not be used. Use the Java Map class and other Collection classes as appropriate. Let the user input the file name from the keyboard. with comments.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions