Objectives:
Student should be able to:
Introduction
In this mini project, you will process some input to confirm a user account. You will not actually create any accounts, just go through the process of validating some input and writting information to a file.
You will prompt the user for a name to create the username, Then you will prompt for a password, then confirm that password. If that all goes well, you will make one final confirmation. If the user does not exists the will be given the choice to be added to the system.
You will be storing information to a text file. The file will contain user names and passwords (this is typically a bad idea but we don't care). The file contains lines of text. Each line is in the form username::password - where username is a unique username and password is an obfuscated version of the user's password.
The password is stored as follows:
A user has a password that is at least 7 characters and does not contain the following characters: ! @ $ : ?
Step 1 takes the first and last character in the password and swaps them.
Step 2 makes the following substitutions:
lowercase i is replaced with !
lowercase a is replaced with @
uppercase S is replaced with $
uppercase J is replaced with ?
For example the password: IsSnappleJuice would be stored es$n@pple?uIcI
A user has a first name and a second name. The username will be the user's first initial concatenated wit their second name. If a user with that username exists in the system, a random 4 digit number is added to the end of username.
See the requirements below for more
Instructions
Write a program that meets the following requirements:
If the file does not exist, create a file called users.txt
if the file does not exist, create a file called log.txt
Ask a user if they have a username.
You need to have fa unction to "encrypt" the password.
You need to have a function that takes the line from the file and returns the username part
You need to have a function that takes the line from the file and returns the password part
You need at least two loops
You need at least two if statements
Submission
All work
must be your own - https://cswiki.betheluniversity.edu/index.php?title=AcceptableWork
All submissions must have a comment at the top of the code that includes your
All submissions must be clearly formated and abstractions (such as variables and functions) should have meaningful names to maximize readability.
All submissions must have a read me text file that contains the following
your name and student ID
the assignment
the course and section
a brief description of the program and any information needed to run your program
a completion statement that details what requirements were met, which were not, and what challenges you faced in the project
a statement of assistance that states if you received significant help from a tutor or class mate or outside sources and includes citations of used sources
Submit your files to Blackboard