1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kipish [7]
3 years ago
7

In this laboratory, we are going to maintain a username-password system by storing the usernames and passwords in a file. The fi

le will consist of a single username and password per line with a space in between.
1. Begin by creating a class PasswordFile which has the following interface:
class PasswordFile
public:
PasswordFile(string filename); // opens the file and reads the names/passwords in the vectors user and password.
void addpw(string newuser, string newpassword); //this adds a new user/password to the vectors and writes the vectors to the file filename bool checkpw(string user, string passwd); // returns true if user exists and password matches
private:
string filename; // the file that contains password information
vector user; // the list of usernames
vector password; // the list of passwords
void synch(); writes the user/password vectors to the password file
The constructor accepts a filename, and reads the file one-line at a time and adds values to the vectors user and password. The function addpw adds a user/password pair to end of each vector.
2. Now create a password.txt file with some entries such as:
jsmith turtle
madams apple
Also create a main program to test your classes :
int main() PasswordFile passfile
("password.txt");
passfile.addpw("dbotting","123qwe");
passfile.addpw("egomez", "qwerty");
passfile.addpw("tongyu", "liberty");
// write some lines to see if passwords match users
Computers and Technology
1 answer:
Dominik [7]3 years ago
5 0

Answer:

Explanation:

ok i will do it for ya

You might be interested in
It is a read mostly memory that can be electronically written into any time without arising prior contact
tatuchka [14]

Answer:

d. EEPROM

Explanation:

EEPROM stands for Electrically erasable programmable read-only memory which is characterized as a non-volatile working memory chipset capable of storing information and distaict on terms of its stability and data retention capability. EEPROM's are very advantageous and provide several up features than most other chipset. The retention ability of information on EEPROM'S such that initial content remains intact while writing even when power is removed. Other memory types mentioned also have their own features, however. EEPROM best suits the description.

3 0
4 years ago
What's the difference between an exe file and an msi file? check all that apply.
motikmotik

An EXE file is an executable that may have an MSI file as one its help; An executable or EXE file can "wrap" an MSI file, which is used by the Windows Installer to guide the building process of an application.

MSI files are utilized by the Windows Installer to control how your application is installed.

<h3>What is the difference between an EXE file and MSI file?</h3>

The main difference between the two attachments is their purpose. EXE is used mainly to indicate that the file is an executable one.

In comparison, MSI indicates that the file is a Windows installer. While an MSI is operated only with installers, this is not the case with EXE.

To learn more about EXE file, refer

brainly.com/question/28146265

#SPJ4

7 0
2 years ago
When looking at a poster from the Art Deco movement, what one design characteristic would you most expect to see?
Lelechka [254]
The correct answer is D. Repeated geometric shapes.
8 0
3 years ago
When creating an input/output table, where do you enter the formula?
balu736 [363]

When creating an input/output table, where do you enter the formula?  

A. In the input cell

B. In the output cell

C. In the title cell

D. In the table of contents


<u>ans. (B) In the output cell</u>

4 0
3 years ago
Charlie does not think he will be able to finish this project by the deadline at this point in the decision making process to so
ad-work [718]

Answer:

Talk to his Manager

Explanation:

In the decision making process of a project it is essential that communication between the team members and the manager of a project is adequate and also communication between the project sponsor and the project manager as well.

If Charlies does not think he will be able to finish the project by the deadline given to him by the project it is important he communicates in time with the manager and ask for a deadline extension while he tries his best to finish up the project on time

8 0
3 years ago
Other questions:
  • Power point 2016 which chart element provides the boundaries of the graphic?
    6·1 answer
  • kindly for the website of stedeo code.org if I login is the time of logging appears at my teacher ??is it registered ​
    14·1 answer
  • After typing “application letter” in the Search window in the New dialog box, Nate clicks the Education category. Three letters
    9·1 answer
  • What stdio.h input function would be used to get input from the user by the keyboard? Write the code to obtain the voltage drop
    7·1 answer
  • What are the pros and cons of using the internet in a medical office setting?
    7·1 answer
  • a sign is to be hung from the end of a thin pole, and the pole supported by a single cable. your design firm brainstorms the six
    13·1 answer
  • 1i) Standardize 'weight' column Write a function named standardize_weight that takes in as input a string and returns an integer
    14·1 answer
  • You want to substitute one word with another throughout your document. What tool(s) should you use?
    9·1 answer
  • Need Help! Asap 7.5 code practice (Edhesive)
    8·2 answers
  • A company is concerned that hackers may gain access to its computer system or that it may be
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!