Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please read the notes in second pic before answer Problem Statement: You are asked to develop a password encryption program to set new passwords and

image text in transcribed

image text in transcribed

please read the notes in second pic before answer

Problem Statement: You are asked to develop a password encryption program to set new passwords and provides the option to encrypt and decrypt them. Problem Description: O o . Your program should provide to the following requirements: Your program will read the password from the user and check if it is valid or not. Valid passwords are of length between 8 to 15 characters and should start with digit. The user has only 3 tries to set correct password, if the user failed with 3 tries to set valid password the application will terminate with error massage. Your program will encrypt the password according to the following algorithm with 3 steps: o Stepl: The first 3 characters will be shifted to the end of the password. o Step2: Reverse the first half characters of the password after shifting. o Step3: Move middle character to front. Example: Original password is : 4A$CDEF9 Password after step 1: CDEF94A$ Password after step 2: FEDC94A$ Password after step 3: CFED94A$ Your program will decrypt the password to get the original one based on the same encryption algorithm. Example: The encrypted password is: CFED94A$ Original password is : 4A$CDEF9 Assignment#2 Programing Specifications: 1. Your are asked to develop a class named Password with the members described in the following UML diagram: class Password pass: string + Password: + readPassword (: void + encrypt Password (): void + decryptPassword (): void + print Password () const: void . A class constructor to initialize the pass member to empty string. The readPassword function to input a valid password from the user and set it to pass member. The encryptPassword function that will encrypt the pass member according the algorithm discussed in the description part. The decryptPassword function that will decrypt the pass member according the same algorithm used in encryption process. The printPassword function to print the pass member. Important Notes: You are asked to implement the encryption/decryption algorithm using stack and queue objects only, any other structures are not allowed. String operations are not allowed. (Hint: Declare stack and queue structures defined in C++ STL ) Submission Notes: Late assignments will NOT be graded. Once finished, compress your code and upload it into your elearning account. Your assignment must compile in order to be graded. The CPP file should have your name, ID, Section, and a short description about the project Comment should be written all over the program. Cheating is not allowed (will be graded to 0). > Due Date: to be announced on e-learning system

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

Step: 3

blur-text-image

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions