Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be fixed in C++ DO NOT COPY AND PASTE ANOTHER CODE IT DOES NOT DO WHAT I NEED Please Modify The code i provide

Must be fixed in C++ DO NOT COPY AND PASTE ANOTHER CODE IT DOES NOT DO WHAT I NEED

Please Modify The code i provide to have the function to Delete and Modify a Password And make it so that the username function only is asked once when you launch to program at the moment it asks everytime you make a password and i don't know how to fix it im stumped

/****************************************************************************** Basic Template for our C++ Programs. *******************************************************************************/ #include /* printf, scanf, puts, NULL */ #include /* srand, rand */ #include /* time */ #include // String managment funtions. #include // For input and output #include // For math functions. #include #include #include //This is what i will be using from the STL Library using namespace std;

class User { protected: string username; string password; public: User() { username = ""; password = ""; } User(string u, string p) { username = u; password = p; } string getUsername() { return username; } string getPassword() { return password; } void setUsername(string u) { username = u; } void setPassword(string p) { password = p; } void input() { cout > username; cout > password; } void output() {

cout

class Database { public: map database; public: Database() { database.clear(); }

void input() { int n; cout > n; for (int i = 0; i second.output(); cout

class Password { protected: int length; int upper; int lower; int numeric; int special; public: Password() { length = 6; upper = 1; lower = 1; numeric = 1; special = 1; } void output() { cout > choice; if (choice == 1) { login(); } else if (choice == 2) { createPassword(); } else if (choice == 3) { changeUser(); } else if (choice == 4) { deletePassword(); } else if (choice == 5) { return; } else { cout > u; if (database.checkUser(u)) { cout > p; if (database.checkUser(p)) { cout > u; if (!database.checkUser(u)) { cout > p; if (!database.checkLogin(u, p)) { cout

int main() { Login login; login.output(); login.run(); return 0; }

This is what the menu should look like

image text in transcribed

The application starts by asking the user for a username. Then, the program displays the following menu: MaIM MENU: 1) LOGIN. 2) CREATE PASSNORD. 3) CHANGE PASSWORD. 4) DELETE USER. 5) EXIT. The application starts by asking the user for a username. Then, the program displays the following menu: MaIM MENU: 1) LOGIN. 2) CREATE PASSNORD. 3) CHANGE PASSWORD. 4) DELETE USER. 5) EXIT

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

Benfords Law

Authors: Mark J. Nigrini

1st Edition

1118152859, 9781118152850

More Books

Students also viewed these Accounting questions

Question

=+(0

Answered: 1 week ago

Question

=+Discuss the importance of research in social media practices

Answered: 1 week ago