Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write, compile and test a program that defines the enumeration datatype Continent which represents continents across the globe. These continents are Asia, Africa, North America

image text in transcribed

Write, compile and test a program that defines the enumeration datatype Continent which represents continents across the globe. These continents are Asia, Africa, North America South America. Antarctica, Europe and Australia. In addition, the program defines the structure City that stores information about a city. In particular, it stores the name of the city its population and the continent in which it is located Towards that end, the developed program should implement the following items: 1. A suitable declaration for the Continent dataType. 2. A suitable declaration for the City structure/datatype. 3. The function setCity that takes a reference parameter to a City and some values for name, population and continent to initialize such a city.setCity. ) returns int 4. The function printSitx that takes a pointer to City and an integer num and prints out the city details as shown below. print itu must return int The format of its output should look as follows: City: 1 The city name: Sharjah The city population: 500000 The city continent: Asia 5. A driver program that reads the data from the file cities.txt and store them in a dynamically created table of pointers to the corresponding Cities. in c++

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

ISBN: 133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago