Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Write a function that receives a name in any of the formats in the original data and returns a name in the specified format.

c++

Write a function that receives a name in any of the formats in the

original data and returns a name in the specified format. The

name is to written in first middle last format. Middle names are optional and it is possible to have multiple middle

names. Here are some examples of the

specified format.

Bilbo Baggins

Jessica Peterson

Caroline B. Wartleton

Connor William Harold Jones

In the original data,the names can be in any of the following formats.

None of the original names are in any other format than the ones

listed below.

last, first

first last

first middle last

last, first middle

Examples

Baggins, Bilbo

Jessica Peterson

Caroline B. Wartleton

Jones, Connor William Harold

Add the function prototype in the `directories.h` file.

std::string FixName(std::string name);

Write the function definition in the `directories.cpp` file.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions