New folder/Final Fuctionality.docx The Final Project for this course is an accumulation of previous weeks’ assignments in which you will utilize all of the skills you have acquired in this course to...

1 answer below »
Final Functionality Please see attachment for full details. I have attached all other functionalities that are needed 1-5. No recommendations were made to me by the instructor if improvement is needed for 1-5 please state what you did to improve my existing script if any. The final homework is listed in the attachment read carefully please and thank you.


New folder/Final Fuctionality.docx The Final Project for this course is an accumulation of previous weeks’ assignments in which you will utilize all of the skills you have acquired in this course to develop an employee management system using Python programming language. In each week of the course, you created various functionalities of an employee management system. Now you will combine all the functionalities you have developed into one single application. Your work will reflect on what you have learned about computer programming during this course, including topics such as variables and expressions, data type and branching, loops and functions, list and dictionary, exception and files. You must include the following components in your Employee Management System: Employee Management System – Functionality 1 In Week 1, you developed the first functionality for the employee management system. You wrote a Python script to allow users to enter the following string values: employeeName, employeeSSN*, employeePhone, employeeEmail, and employeeSalary. To complete this section, incorporate the instructor feedback you received for your Week 1 Assignment and provide an updated screen shot of this functionality, along with the description of the functionality. Employee Management System – Functionality 2 In Week 2, you developed the second functionality of the employee management system in which you allowed users to enter information for five employees at the same time. To complete this section, incorporate the instructor feedback you received for your Week 2 Assignment and provide an updated screen shot of this functionality, along with the description of the functionality. Employee Management System – Functionality 3 In Week 3, you developed the third functionality of the employee management system. You made use of looping to allow your Python script to run constantly. You then separated functionality 1 into two functionalities – “Add Employee” and “View all Employees”. Finally, you utilized global variables to develop a counter that keeps track of the number of employees in the system. To complete this section, incorporate the instructor feedback you received for your Week 3 Assignment and provide an updated screen shot of this functionality, along with the description of the functionality. Employee Management System – Functionality 4 In Week 4, you developed the fourth functionality of the employee management system. You improved the “View all Employees” functionality that was developed in Week 3 and added two new functionalities to your employee management system – “Search employee by SSN” and “Edit employee information.” To complete this section, incorporate the instructor feedback you received for your Week 4 Assignment and provide an updated screen shot of this functionality, along with the description of the functionality. Employee Management System – Functionality 5 In Week 5, you added two new functionalities to your Employee Management System – “Export employees’ information to text file” and “Import employee’s information from text file.” To complete this section, incorporate the peer and/or instructor feedback you received for the two new functionalities. Provide an updated screen shot of this functionality and the description of the functionality. Final Deliverable You will now combine all the functionalities you have developed into one single application. Explain the steps you took to combine all of the functions into one single application, and provide a screen shot of the final Employee Management System. The end product should look similar to the following: ------------------------ Employee Management System --------------------------- There are ( 5 ) employees in the system. ------------------------------------------------------------------------------------------- 1. Add new employee 2. View all employees 3. Search employee by SSN 4. Edit employee information 5. Export employees’ information into a text file 6. Import employees’ information from a text file ------------------------------------------------------------------------------------------- Please enter your option number: The Employee Management System must provide the following in a Word document: · Screen shots of all of the functionalities of the Employee Management System, along with their descriptions. · An explanation of the steps you took to combine all of the functions into one single application. · A brief description of the purpose of the Employee Management System. · The script for the final Employee Management system. Ensure that the Employee Management System runs correctly. The Employee Management System Project · Must include a screen shot of all the functionalities. · Must include an attached zip folder that contains the running source code file of the Final Project. · Must include a separate title page with the following: · Title of paper · Student’s name · Course name and number · Instructor’s name · Date submitted New folder/Week 2 Assignment.docx Week 2 Interactive Assignment Melaine Weaver CPT200: Fundamentals of Programming Languages Dr. Amjad Alkilani March 16, 2021 INPUT: OUTPUT: Variables Used In Program employeeName = This variable is used to store in employee name employeeSSN = This variable is used to store in employee SSN employeeNumber = This variable is used to store in employee number employeeEmail = This variable is used to store in employee email employeeSalary = This variable is used to store in employee salary phoneNumber = This variable is used to store phone number in proper format i = This variable is used to execute the loop emp_dict = This variable is used to create the dictionary for storing employee’s information using index This program is used to prompt user employee information and display the information. In this course, we have created an empty dictionary a wearable which will I trade the whole loop. While you enter information about five employees, the code will ask the user to enter information about employees one by one. Once the user enters information about the first employee, it will be saved into the dictionary, and the value of I will increase by one. Once the "i" becomes 5, then the while loop breaks, and it comes out of the loop. The program asks the user to enter the index value to find information about the employee. The program will print the information about the employee, which has the same index in the dictionary. Code: import re emp_dict={} i=0 while(True): if(i==5): break print("-----Employee ",i+1,"-----") employeeName = input("Enter name: ") employeeSSN = input("Enter SSN: ") employeeNumber = int(input("Enter phone number: ")) phoneNumber = re.sub(r'(\d{3})(\d{3})(\d{4})', r'(\1)\2-\3', str(employeeNumber)) employeeEmail = input("Enter email: ") employeeSalary = float(input("Enter salary: ")) print('---------------------------------------------') i = i+1 info = employeeName+', '+employeeSSN+', '+str(phoneNumber)+', '+employeeEmail+', $'+str(employeeSalary) emp_dict[i] = info userInput = int(input("Please enter index value to view employee's information")) print(emp_dict[userInput]) New folder/Week 5_Interactive_2_ Assignment.docx Week 5 Interactive Assignment 2 The University of Arizona Global Campus CPT200: Fundamentals of Programming Languages Dr. Amjad Alkilani April 1, 2021 Employee Management System Functionality 5 This function will write employee details into the file. def write_file(json_object): obj = json.dumps(json_object) #create a json object with open('employee.json', 'w') as file: file.write(obj) #write to the file file.close() ============================================================================================================ This function will add new employee details into the file. def addEmp(i): """Add new employee details""" global json_object #use global data print("----- Employee", i, "-----") #employee count employeeName = input("Enter Name: ") #name of new employee employeeSSN = input("Enter SSN: ") #employee SSN employeeNumber = re.sub(r'(\d{3})(\d{3})(\d{4})', r'(\1)\2-\3', str(int(input("Enter phone number: ")))) #employee contact employeeEmail = input("Enter email: ") #employee email employeeSalary = '$' + str(float(input("Enter salary: "))) #employee salary print('---------------------------------------------') emp_dict = {i: [employeeName, employeeSSN, employeeNumber, employeeEmail, employeeSalary]} json_object.update(emp_dict) #update the dictionary write_file(json_object) #write to file ============================================================================================================ This function will display the result whenever generalView() function will call and will display in proper way. def generalView(key): """Generalized view of the dictionary to call in different functions""" global json_object print("\t\t\t---------------------------- {} ----------------------------" .format(json_object[key][0])) print("SSN: ", json_object[key][1]) print("Phone: ", json_object[key][2]) print("Email: ", json_object[key][3]) print("Salary: ", json_object[key][4]) print("\t\t\t-----------------------------{}-----------------------------" .format('-' * len(json_object[key][0]))) ============================================================================================================ This function will display all the details of all the employees whose data has stored in the file. def viewAllEmployees(): """View all employees""" global json_object for key in json_object.keys(): generalView(key) #for all keys in dictionary get the general view ============================================================================================================ This function will help to see the employee details by using index. Here index will be input from the user and based on input fucntion will display the result. def viewEmpByIndex(): """Display employee only based on index value""" global json_object userInput = int(input("Please enter index value to view employee's information: ")) generalView(str(userInput)) #get general view only for the index. ============================================================================================================ This function will help to see the employee details by using employee's SSN. Here SSN will be input from the user and based on SSN, fucntion will display the result. If SSN not found in the file then it will print (No match found for the entered SSN!). def viewEmpBySSN(SSN): """Display employee only based on SSN""" global json_object for key in json_object.keys(): if SSN in json_object[key]: generalView(key) #get the general view if SSN is present in the dictionary item break #once the item is found break the loop else: continue #continue the loop if not found else: print("No match found for the entered SSN!") #match not found in dictionary ============================================================================================================ This function will edit the employee details, if user wants to modify the employee salary,number or mailid then this function will help. This function will allow to the user to modify the data of the employee. This
Answered 4 days AfterMar 29, 2021

Answer To: New folder/Final Fuctionality.docx The Final Project for this course is an accumulation of previous...

Pratap answered on Apr 02 2021
158 Votes
"""
-----EMPLOYEE MANAGEMENT SYSTEM-----
Follow the menu options to add, view, edit
employee details within the system
"""
#import libraries
import re
import json
def write_file(json_object):
"""Write employee details to file"""
obj = json.dumps(json_object) #create a json object
with open('employee.json', 'w') as file:
file.write(obj) #write to the file
file.close()
def addEmp(i, employeeName, employeeSSN, employeeNumber, employeeEmail, employeeSalary):
"""Add new employee details to the system"""
global json_object #use global data
emp_dict = {i: [employeeName, employeeSSN, employeeNumber, employeeEmail, employeeSalary]}
json_object.update(emp_dict) #update the dictionary
write_file(json_object) #write to file
def getEmp(i):
"""Function to get employee details by the user"""
print("----- Employee", i, "-----") # employee count
employeeName = input("Enter Name: ") # name of new employee
employeeSSN = input("Enter SSN: ") # employee SSN
employeeNumber = re.sub(r'(\d{3})(\d{3})(\d{4})',
r'(\1)\2-\3', str(int(input("Enter phone number: ")))) # employee contact
employeeEmail = input("Enter email: ") # employee email
employeeSalary = '$' + str(float(input("Enter salary: "))) # employee salary
print('---------------------------------------------')
return employeeName, employeeSSN, employeeNumber, employeeEmail, employeeSalary
def generalView(key):
"""Generalized view of the dictionary
to call in different functions"""
global json_object
print("\t\t\t---------------------------- {} ----------------------------"
.format(json_object[key][0]))
print("SSN: ", json_object[key][1])
print("Phone: ", json_object[key][2])
print("Email: ", json_object[key][3])
print("Salary: ", json_object[key][4])
print("\t\t\t-----------------------------{}-----------------------------"
.format('-' * len(json_object[key][0])))
def viewAllEmployees():
"""View all employees"""
global json_object
for key in json_object.keys():
generalView(key) #for all keys in dictionary get the general view
def viewEmpByIndex():
"""Display employee only based on index value"""
global json_object
userInput = int(input("Please enter index value to view employee's information: "))
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here