Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Write a function that receives an email in any of the formats in the original data and returns an email in the specified format.

C++

Write a function that receives an email in any of the formats in the original data and returns an email in the specified format. The email is to be complete including username, @, and domain.

In the original data,some of the emails have been abbreviated. If the email only has the username (no @ or domain), it is a student email account. In this case, add @student.mail to the username.

bilbo.baggins becomes: bilbo.baggins@student.mail 

If the email has the username, an @, and the first part of the domain, add .com at the end.

 bilbo.baggins@student.mail becomes: bilbo.baggins@student.mail 

Add the function prototype in the directories.h file.

 std::string FixEmail(std::string email); 

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

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

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

Why are sales a credit?

Answered: 1 week ago