C++
13.5 LAB: Zip code and population (class templates)
Define a class StatePair with two te...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 27.04.2021 15:50 0Brittany0
C++
13.5 LAB: Zip code and population (class templates)
Define a class StatePair with two template types (T1 and T2), constructors, mutators, accessors, and a PrintInfo() method. Three vectors have been pre-filled with StatePair data in main():
vector> zipCodeState: ZIP code - state abbreviation pairs
vector> abbrevState: state abbreviation - state name pairs
vector> statePopulation: state name - population pairs
Complete main() to use an input ZIP code to retrieve the correct state abbreviation from the vector zipCodeState. Then use the state abbreviation to retrieve the state name from the vector abbrevState. Lastly, use the state name to retrieve the correct state name/population pair from the vector statePopulation and output the pair.
Ex: If the input is:
21044
the output is:
Maryland: 6079602
main cpp :
#include
#include
#include
#include
#include "StatePair. h"
using namespace std;
int main()
{
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 06:00
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
You know the right answer?
Questions
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 03.12.2020 21:20
![question](/tpl/images/cats/en.png)
English, 03.12.2020 21:20
![question](/tpl/images/cats/mat.png)
Mathematics, 03.12.2020 21:20
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 03.12.2020 21:20
![question](/tpl/images/cats/istoriya.png)
History, 03.12.2020 21:20
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 03.12.2020 21:20
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 03.12.2020 21:20
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/geografiya.png)
Geography, 03.12.2020 21:20
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mir.png)
World Languages, 03.12.2020 21:20
![question](/tpl/images/cats/mat.png)