#include “splashkit.h” #include using std::vector; using…

Question Answered step-by-step #include “splashkit.h” #include using std::vector; using… #include “splashkit.h”#include using std::vector;using namespace std; string read_string(string prompt){    string result;     write(prompt);    result = read_line();     return result;} int read_integer(string prompt){    string line;    line = read_string(prompt);    return convert_to_integer(line);} int total_length(const vector &names){    int result = 0;     for(int i = 0; i < names.size(); i++)    {        string name = names[i];        result += name.length();    }     return result;} bool contains(const vector &names, const string &name){    for(int i = 0; i < names.size(); i++)    {        if( to_lowercase(names[i]) == to_lowercase(name) )        {            return true;        }    }    return false;} string shortest_name(const vector &names){    string min;     min = names[0];     for(int i = 1; i < names.size(); i++)    {        if ( min.length() > names[i].length() )        {            min = names[i];        }    }     return min;} int index_of_yin(const vector &names, const string &name){    for(int i = 0; i < names.size(); i++)    if(to_lowercase(names[i]) == to_lowercase(name) )    {        write("yin has index of: ");        return(i);    }    return -1;} void print_summary(const vector &names){      write_line(” ~ Names List ~ “);    int total;        total = total_length(names);        write(“Total Length: “);        write_line(total);        write(“Shortest name: “);        write_line(shortest_name(names));        bool has_yin;        has_yin = contains(names, “yin”);        if (has_yin)    {        write_line(“Contains yin”);      }      int index = index_of_yin(names, “yin”);     write_line(index);} int main(){    vector names;    int size;    int i;    i = 0;     size = read_integer(“How many names? “);    while (i < size)    {        names.push_back(read_string("Enter a name: "));        i++;    }    for(i = 0; i < names.size(); i++)    {        write_line(names[i]);    }     int total;    total = total_length(names);     write("Total length: ");    write_line(total);     bool has_yin;    has_yin = contains(names, "yin");     if ( has_yin ) write_line("contains Yin");     write_line(shortest_name(names));     print_summary(names);    print_reverse(names);     return 0;}Image transcription textExtending This Program — processing names in reverse order... To finish this program for the task, add a newprocedure to the program called print_reverse and write the code to display the names stored in the vector inreverse order (i.e. the last name in the vector should be displayed first, followed by the second las... Show more... Show morePlease do not change codes above, and focus on extending program as picture shown Computer Science Engineering & Technology C++ Programming SIT 102 Share QuestionEmailCopy link Comments (0)