C++

please help me

Ten new employees are recently hired by the XYZ Company. You are asked to write a complete C++
program that will read in the information about each employee and allow them to change their
passwords. Your program will be called yournameandsurname.cpp and will simply do the following:

1. Display a main menu – which will be the welcome screen and entering point to the program.
Here your program will display THREE options to the user using the switch statement:

Welcome to PasswordMaster *****
Please select:
1: to enter new employees
2: to log in and change password
3: to exit the program

Hint: implement a function for displaying main menu. Program will only exit if the user chooses
option 3.

2. For option 1, the program should ask new employee name, surname and email address and read
them into appropriate arrays, namely name, surname and email respectively. Program would
then display the main menu.

Example input data:
john smith jsmith@xyz.com
jane brown jbrown@xyz.com
mary adams madams@xyz.com
tim roberts roberts@xyz.com
peter scott pscott@xyz.com
liz colins lcolins@xyz.com
helen jameson hjameson@xyz.com
edwin li eli@xyz.com
daniel anderson danderson@xyz.com
mark david mdavid@xyz.com

3. For option 2, the program should ask the user to enter their email. At this point the user is
provided with the following message: “If this is your first time here, your initial password is set to
your first name’s initial combined with your surname. For example, initial password for a “John Doe” would be “jdoe”. You can change this password to anything. It can be up to a max of 8 alphanumerical characters and a minimum of 3 alphanumerical characters.” The user is thenasked to enter their *current* password. The program checks whether the input is the same as the value saved for this user, if they do not match, then the user is asked to enter the current password again.

•If the user fails to enter a matching password in three consecutive attempts, the
program will display the main menu.
If the password entered matches the saved value, then the user is asked to enter a *new*
password. Your program must check that the length of this password is in between 3 and 8, both
included. If not, ask the user to try again. When the user enters a correct length password, the
user is asked to *re-enter* the new password. Here your program should check that both entries
are exactly the same which means this would be the new password for this user. A confirmation
message is displayed to the user and flow control returns back to the main menu.

•If the re-entered password is not the same as the first new password then the whole
process is repeated (i.e. ask the user to enter a *new* password and then *re-enter*
password).

Notes:
•You are advised to use functions and arrays appropriately in order to optimise your
solutions. Marks will be awarded proportional to the best of design, efficiency and
performance, as well as layout, structure, presentation and of course functionality.

•Do not forget comments in your programs. Each program should start with a comment
block naming the author, last date of update and the purpose of the program.

•Design your code to store up to a maximum of 100 employees in total.
Important: The above is a hard deadline. A 5% penalty will be applied per day (including weekends)
to any submissions after this date and time!

Bonus: Bonus points will be given to those who implement a display function which could be added to the
main menu. This function would provide the option to view the password of an employee when the email is
entered.

Recommended Answers

All 4 Replies

Member Avatar for iamthwee

This sounds like a good challenge. What's the prize??

do your own homework, kiddo.

>What's the prize??
The prize is full marks to the OP if he can convince some rube to help him cheat on his homework.

> The prize is full marks to the OP if he can convince some rube to help him cheat on his homework.
Not to mention, also convincing the rube doing the marking that this sudden masterpiece of a program from the class laggard is actually their own work.

I think we should all have a go at this homework.
http://www.daniweb.com/forums/thread281359.html
It comes complete with a submission email address (handy that, cuts out the middle).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.