Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include Support.h #include #include #include using namespace std; / / There are two errors in the DisplayUserInfo method. The variables used in / /

#include "Support.h"
#include
#include
#include
using namespace std;
// There are two errors in the DisplayUserInfo method. The variables used in
// the method do not match the parameters and/or local variables. Either
// update the variables being used or update the definitions so the identifier
// names being used match the identifiers names defined. You do not need to
// add any additional programming statements
static void DisplayUserInfo(string who, int age)
{
cout "Please provide a warm welcome to my next guest, ";
cout who +", on the occasion of turning " age " years old!" endl;
}
// there are 2 errors in the SayABCs method. One is an incorrect variable
// name and the other is a 'punctuation' error. You do not need to add any
// additional programming statements
static void SayABCs()
{
for (int ndx =97; ndx =122; ndx++)
{
if ((ndx +3)%10==0)
{
cout "
" endl;
}
if (ndx ==97)
cout "
" static_cast(ndx)"" endl; // this line should have a breakpoint
else
cout static_cast(ndx)+"" endl;
}
cout "
" endl;
}
// there is one error in the Main method - it is a simple typo that needs to
// be corrected. You do not need to add any additional programming statements
int main()
{
const vector names ={ "ybraD", "ecnerwaL", "haraS", "refinneJ", "yevaD", "atteirneH", "selrahC", "sicnarF", "yrograM",
"wemelohtraB", "moT", "leahciM", "ymereJ", "ennA", "elleinaD", "mailliW", "suiriS", "enoimreH",
"naitsabeS", "nosaJ", "adnamA", "ettedO", "pirT", "noiraM", "enerI", "auhsoJ", "ellehciM" };
// Get a random age and name from the Support class
int age = Support::GetAge(Support::RandomInt(Support::MIN, Support::MAX));
string name = Support::GetName(names[Support::RandomInt(0, names.size())]); // This line should have a breakpoint
DisplayUserInfo(name, age); // This line should have a breakpoint
SayABCs();
cin.get();
}
image text in transcribed

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

Students also viewed these Databases questions

Question

discuss the value of thinking in images.

Answered: 1 week ago

Question

Develop skills for building positive relationships.

Answered: 1 week ago

Question

Describe techniques for resolving conflicts.

Answered: 1 week ago

Question

Give feedback effectively and receive it appropriately.

Answered: 1 week ago