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
Which cable would you check if you can't access any web pages?
ozzi

Answer:

If You Can't Access the Web

We'll assume that your Internet was working at an earlier point. If you are setting it up for the first time, the steps listed below were not designed with that purpose in mind. You need to follow the instructions that came with your router or modem.

I've included a series of definitions for the terminology used on this page.

Reboot the Computer

The first step should be rebooting your computer or device to see if that fixes the problem. You'd be surprised how often that simple step resolves issues.

If restarting your computer or device doesn't work, you'll have to check out each potential problem area to see if it restores access.

Check These Areas

The most likely problem areas related to a loss of Internet assess are one or more of the following:

your computer is disconnected from the network (check the network settings;

a proxy has been added to your browser or operating system;

your high-speed modem and/or router needs resetting or is disconnected;

a disconnected network cable (if your computer is wired);

your computer needs to reboot;

your firewall or security software is misconfigured; or

Your software is misconfigured for access to the Internet.

Progress through the suggestions on this page to test alternative solutions. I've presented them in the order I'd likely progress if I were to be assessing the problem and looking for solutions.

ISP Issues

If the issue is with your ISP or (rarely) a regional access issue, the resolution is beyond your control. You'll just have to wait for your ISP or the Internet structure to repair the problem.

5 0
3 years ago
To edit the color of the text in Word Online, choose the Font color command under what tab?
sukhopar [10]

Answer:

Home Tab

Explanation:

Font group --- choose the arrow next to Font Color, ---- then select a color.

8 0
3 years ago
What does computer graphics mean?​
barxatty [35]

Answer:Computer graphics involves display, manipulation, storage of images, and experimental information for proper visualization.

( or you can say )

the products of the graphic arts, especially commercial design or illustration.

Explanation: <3

5 0
3 years ago
What are some recent inventions that have improved the quality of your life?
Eva8 [605]
Phones, they help me with school work and provide entertainment.
4 0
3 years ago
Which computers were the first PCs with a GUI<br> MS-DOS <br> Linux<br> Windows<br> Mac
sergeinik [125]

Answer:

The first computer with a GUI were linux, microsoft and apple.

Explanation:

I think this is right. Hope it helped <3

8 0
3 years ago
Read 2 more answers
Other questions:
  • Email applications can either be local email client programs or web-based applications. Which application is an example of a loc
    13·2 answers
  • What are some local storage devices?​
    6·1 answer
  • Your smartphone, digital camera, and printer are all part of a network in your workspace. What type of network is likely in use
    7·1 answer
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    7·2 answers
  • What is a CPU or a GPU? What’s the difference? Which one is better?
    5·1 answer
  • What is the keyboard shortcut to display the merge to printer dialog box?
    5·1 answer
  • If you are working with a team of students on a class project and your team chooses to share content by uploading Word and Excel
    13·1 answer
  • The design of a blog refers to:
    8·1 answer
  • How do you think Beyoncé choreography has/will influence the future of dance?
    9·2 answers
  • A.1111+1011. b. 10111+11111 c. 1111*1011 d. 1110*1101 perform the binary calculations.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!