Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that reads in a line consisting of the students name, Social Sec

ID: 3667288 • Letter: W

Question

Write a program that reads in a line consisting of the students name, Social Security number, userid, and password. The program outputs the string in which all of the digits of the Social Security number and all the characters in the password are replaced by x. The Social Security number is in the form of 000–00–0000, and a user ID and a password do not contain any spaces. Your program should not use the operator [ ] to access a string element. Use the appropriate functions define in your textbook.

Assignment Requirements:

Start by analyzing the problem; use an IPO chart and pseudocode (or flowchart) to brainstorm the logic prior to start coding. Using Visual Studio code and test your program according to your pseudocode solution. Once you are satisfied with your program outcome, open a Word document and insert a cover page, include your design IPO chart, pseudocode or flowchart, C++ source code, and print screen shots of the DOS command dialog window showing your test results. Be sure to test the program at least two times to insure the program executes properly.

Insure that your C++ source code is fully documented by including source code comments. Include a “flower box”, i.e.

/* Programmers full name:
Today’s Date:
Lesson number:
Program purpose: */

Assignment must be submitted as a Word document.  

Plagiarism will not be tolerated. Students who plagiarize can receive an “F” for the assignment, an “F” for the course, or expulsion from the program depending on the severity of the violation.

I need 2 Screenshots

Explanation / Answer

include <iostream>
include <string>
using namespace std;
int main()
{
string strVar;
int name, ssn, userID, password;
cout << "Enter a student's name, social security number(with dashes), user id, and password in one line:" << endl;
getline(cin, strVar);
cout << endl;
name = strVar.find(' ', 0);
ssn = strVar.find(' ', name + 1);
strVar.replace(ssn + 1, 3, "xxx");
strVar.replace(ssn + 5, 2, "xx");
strVar.replace(ssn + 8, 4, "xxxx");
userID = strVar.find(' ', ssn + 1);
password = strVar.find(' ', userID + 1);
strVar.replace(password + 1, 10, "xxxxxxxx");
cout << strVar << endl;
system("pause");
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote