Language: C++ Create a class named City. Assume that a city has a name, a number of inhabitants, a mayor and an area (in km²). Then create three instances of this class: Bremen, Paris and London....


Language: C++<br>Create a class named City. Assume that a city has a name, a number of inhabitants, a mayor<br>and an area (in km²).<br>Then create three instances of this class: Bremen, Paris and London. Provide suitable setter and<br>getter methods for each of these properties. The class declaration has to be placed into City.h,<br>the class definition has to be placed into City.cpp and the test program where the instances are<br>created has to be in testcity.cpp.<br>You can set the needed data from the main () function by initialization or read it from the key-<br>board.<br>

Extracted text: Language: C++ Create a class named City. Assume that a city has a name, a number of inhabitants, a mayor and an area (in km²). Then create three instances of this class: Bremen, Paris and London. Provide suitable setter and getter methods for each of these properties. The class declaration has to be placed into City.h, the class definition has to be placed into City.cpp and the test program where the instances are created has to be in testcity.cpp. You can set the needed data from the main () function by initialization or read it from the key- board.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here