Question: This is what I have for my code so far // Example program #include #include using namespace std; void split(string &fullName, string &firstName, string &lastName);

This is what I have for my code so far
// Example program
#include
#include
using namespace std;
void split(string &fullName, string &firstName, string &lastName);
int main()
{
string firstNameOne, firstNameTwo, firstNameThree;
string lastNameOne, lastNameTwo, lastNameThree;
cout
cin >> firstNameOne >> lastNameOne;
cin >> firstNameTwo >> lastNameTwo;
cin >> firstNameThree >> lastNameThree;
string fullNameOne= lastNameOne + " " + firstNameOne;
string fullNameTwo = lastNameTwo +" " +firstNameTwo;
string fullNameThree = lastNameThree+" " +firstNameThree;
cout
cout
if (lastNameOne > lastNameTwo && lastNameTwo > lastNameThree)
{
cout
cout
cout
if (lastNameOne lastNameThree )
{ cout
cout
cout
if (lastNameOne
{
cout
cout
cout
if ( lastNameOne lastNameThree )
{
cout
cout
cout
if (lastNameOne > lastNameThree && lastNameTwo
{
cout
cout
cout
if (lastNameOne > lastNameTwo && lastNameOne
{
cout
cout
cout
}
return 0;
}
void split(string &fullName, string &firstName, string &lastName)
{
// Receives a full name (as in First Last).
// Returns separately the first name and the last name
// through the 2 reference parameters.
}
 This is what I have for my code so far //

l Verizon LTE 9:18 PM 40% i , Personal Hotspot: 1 Connection a sakai.uri.edu objective: D The objective of this lab is for you to make use of strings in C++. As part of this lab, you will need to perform simple string (and character) manipulations, and you will need to compare strings The problem: For this lab, you need to develop a C++ program: . that allows the user to enter 3 full names, in the "First Last format, that transforms these full names in the "Last, First format e and that sorts these 3 names. The folowing could be sample runs of your program Enter 3 full nanes (as in John Doe) Enter 3 full nanes (as in John Doe) i ROR Smith iane bo iohn adans ferson, Thonas 2 As the 3 names are entered, you must vaidate the input, by checking that there is exactly one space in each full name 0.e., "John Quincy Adams" would not be a valid name for this program) You must correct the capitalization in the names. For example, you can notice that in the sample runs above Tohn adams" is changed to "Adams, John" or that "BOB Smith is changed to "Smith, Bob You must sort that ist of names (only 3 names) by last name. You will notice that, with identical last names, the full names are sorted by frst names It may be useful to have a function that breaks a full name into a first name and a last name, for example something like void split(string &ful ?Nane, string 4firstNane. string &lastName) Receives a full name (as in First Last) Returns separately the first nane and the last nane through the 2 reference Paranet. Note that that same function could aso take care of the reading of a ful name from the user, and the necessary checking of the ingut What to hand inc Submit your epp file through Sakai Lab #9-Who Is On First

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 Databases Questions!