Question: PLEASE DO THIS IN C++ AND PLEASE MATCH THE OUTPUT TOO DON'T SPAM POST THANK YOU THIS IS MY CODE FOR CITY.H FROM PREVIOUS LAB

PLEASE DO THIS IN C++ AND PLEASE MATCH THE OUTPUT TOO DON'T SPAM POST THANK YOU

THIS IS MY CODE FOR CITY.H FROM PREVIOUS LAB

CITY.H

#ifndef CITY_H #define CITY_H #include //include utility library #include

using namespace std;

class City { public: //Initializing as pair City(string nm, unsigned int pop) { namePopulationPair.first = nm; namePopulationPair.second = pop; } void setName(string name) {this -> namePopulationPair.first = name;} void setPopulation(unsigned int population) {this -> namePopulationPair.second = population;} string getName() const {return this-> namePopulationPair.first;} unsigned int getPopulation() const {return this -> namePopulationPair.second;} virtual void printInfo() const { cout":>;> protected: pair namePopulationPair; }; #endif,>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!