Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have written a program that contains five functions: 1 Three separate functions to ask the user for their first, middle and last names (strings)

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
I have written a program that contains five functions: 1 Three separate functions to ask the user for their first, middle and last names (strings) 2) A function to determine the length of the user's full name (first+ middle last) 3) A function to determine if the user's name is a palindrome (ignoring case) The program calls these functions in main to request the user's full name (stored as three string variables in main), to determine the length of the user's full name, and to determine if the user's name is a palindrome. The program ends by displaying a summary to the user Review the code for this program so you understand how it works. The code is in the file homework8.cpp on Canvas. You will modify this program to use reference parameters following the instructions below 1. You must not use any global variables. A program with global variables will receive a O! 2. Only parameters used to pass information back to the caller should be reference parameters. . Follow all guidelines from class for creating functions that take reference parameters. You will make the following changes to my program: 1. Combine getFirstName(), getMiddleName) and getLastName () into a single function that asks the user for all three names. These three names are passed back to the caller. Call this new function in main to set the string variables first, middle, and last. Note: you may be tempted to simplify this function by combining the names into a single parameter do NOT do this. a. 2. Combine calcLength and isPalindrome into a single function that takes the three names as parameters and passes both the int and bool results back to the caller. Call this new function in main to set the variables nameLength and isPal Note: you may be tempted to simplify this function by combining the names into a single parameter- do NOT do this. a

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