Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

This program will test your new function and OOP logic. Again, you will be enhancing and changing your program from last week by converting the

This program will test your new function and OOP logic. Again, you will be enhancing and changing your program from last week by converting the username logic to a method, creating 2 classes (person and employee) and adding several class methods including a password generator. First, you will take your last week program and add input logic to ask the end user what type of password they would like with their new username. You will ask the employee 3 additional questions. How long they would like their password to be and would they like special characters and numbers in their password. You must validate the password length to be no less than 10 and no greater than 16 and it must also be an integer. After the input section is enhanced, you will need to create 2 class files, person.py and employee.py. and the employee class will inherit from the person class. The classes will have several properties (attributes) and several methods. Within the employee class you will create a password method that will be called while passing the employees choices into the employee class. The function will then create the password and then return the new password to a string variable. There will be several more methods outline below. After that is complete, you will convert your code to generate a username into a value returning function. This function will take first name, last name, and year of birth as parameters and return the password to the calling function. You will also need a way to retrieve and store new information from the person class, a message for each person and their age in years. The last step in the processing will be to create an employee data dictionary that will use the username as the key and a list with employee first name, last name, year of birth and password. Finally, you will output much of your data with the use of the print() function. This program will need the import statements for username and todays date. This program must have a flower box comment section with your name, date created, and description of the program (FYI: Not My Description from Above) This program will modify and enhance project 3. Input section: Add logic to the input section that will add 3 additional questions about password construction. How long do you want your password? Length must be between 10 and 16 in length. Do you want special characters in your password? Do you want numbers in your password? You will validate the password length the user entered and make sure it is at least 10 but not greater than 16 and that it can be converted to an integer. You will add the new input to the employee data list for later processing. Classes needed: (in separate py files) Person class: Properties: first name, last name, birth_year Methods: greet person that returns a message and age that will return a persons age in years based on the current year Employee class: Will inherit from the Person class Properties: password length, use special characters flag, use numbers flag Methods: build password that will take the properties and create a password that will be of the requested length and have special characters and numbers if the employee request them. Process section: Gather the data entered in a list with the elements being of type tuple containing first name, last name, birth_year (this Add a function under the variable section to generate a username. (see example below) This function will take the first name, last name and year of birth as parameters along with a duplicate found flag. The duplicate found flag will be used in the functions if else logic to generate the correct type of username. You will then pass the username back out to the function call.After the creation of the username, instantiate a copy of the employee class and pass all the employee data to it including first name, last name, birth year, password length, use special characters flag, and use numbers flag. Within the person class you will create a message and calculate the persons age in years and store that information in a list to be printed out in the output section. In the employee class (which should inherit from person), you will generate a password of required length and use special characters and numbers if the employee has requested. Pass the password back to your main program. Create a list with the following data in it and add it to the Employee data dictionary INSTEAD of the content of the employee tuple. Use the username as the key and a tuple as the value with the following data: first name, last name, year of birth, password in a list Leave the copy and sort of the username list in from last week.

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_2

Step: 3

blur-text-image_3

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students explore these related Databases questions