0

Consider an application which allows an administrator to enter information about cities which could be viewed by others. There are only three groups (continent, country, city) which they can (but not must) add content to. When adding a city, the application magically knows the continent and country of the city, and the continent and country text will be used. If a city is edited and the continent text is changed, all cities which are located on that continent will have their continent text changed. Please assume users will only be directly viewing "cities", and will view continents and countries only as they are associated with a city. While the administrator must be aware that changing continent or country text changes other cities, the front-end viewers should not be aware that there are three distinct groups.

How should an administrator add/edit the continent, country, and city text for a given city?


San Francisco (backend)

Continent:

North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.

Country:

The United States of America, is a federal republic composed of 50 states, a federal district, five major territories, and various possessions.

The 48 contiguous states and Washington, D.C., are in central North America between Canada and Mexico. The state of Alaska is in the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific.

City:

San Francisco, officially the City and County of San Francisco, is the cultural, commercial, and financial center of Northern California and the only consolidated city-county in California. San Francisco encompasses a land area of about 46.9 square miles on the northern end of the San Francisco Peninsula, which makes it the smallest county in the state.


San Francisco (frontend)

North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.

The United States of America, is a federal republic composed of 50 states, a federal district, five major territories, and various possessions.

The 48 contiguous states and Washington, D.C., are in central North America between Canada and Mexico. The state of Alaska is in the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific.

San Francisco, officially the City and County of San Francisco, is the cultural, commercial, and financial center of Northern California and the only consolidated city-county in California. San Francisco encompasses a land area of about 46.9 square miles on the northern end of the San Francisco Peninsula, which makes it the smallest county in the state.

San Diego (frontend)

North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.

The United States of America, is a federal republic composed of 50 states, a federal district, five major territories, and various possessions.

The 48 contiguous states and Washington, D.C., are in central North America between Canada and Mexico. The state of Alaska is in the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific.

San Diego (Spanish for "Saint Didacus") is a major city in California, on the coast of the Pacific Ocean in Southern California, approximately 120 miles (190 km) south of Los Angeles and immediately adjacent to the border with Mexico.

Mexico City (frontend)

North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.

Mexico, officially the United Mexican States is a federal republic and sovereign nation located in North America. The country is bordered to the north by the United States; to the south and west by the Pacific Ocean; to the southeast by Belize, Guatemala and the Caribbean Sea; and to the east by the Gulf of Mexico.[13] Covering almost two million square kilometres (over 760,000 sq mi), Mexico is the fifth largest country in the Americas by total area and the 13th largest independent nation in the world.

Mexico City, or the City of Mexico, is the capital of Mexico. As an "alpha" global city, Mexico City is one of the most important financial centers in the Americas. It is located in the Valley of Mexico (Valle de México), a large valley in the high plateaus at the center of Mexico, at an altitude of 2,240 metres (7,350 ft).

Vancouver (frontend)

North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.

Vancouver officially the City of Vancouver, is a coastal seaport city on the mainland of British Columbia, Canada. The 2011 census recorded 603,502 people in the city, making it the eighth largest Canadian municipality. The Greater Vancouver area of around 2.4 million inhabitants is the third most populous metropolitan area in the country, the second largest city on the United States–Canada border, and the most populous in Western Canada.

  • I kind of understand what you're saying, but I'm not sure what the problem is? Why can't the admin just update the content in your database, or template, or through an admin page? How often is this information getting updated? Continent and Country seem generic enough that they're not likely to change too often. – Brett East Mar 28 '16 at 16:32
  • @BrettEast 1 Continents, 2 countries, and 3 cities was an analogy for a 1 project, 2 something being sold, and 3 something being bought, and all three will be changed often. Yes, the admin will update the content via an admin page, but do I make it intuitive? – user1032531 Mar 28 '16 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.