Task

Write a Python script to create and manage a very basic personnel database for a human resources department in a fictional organisation.

The personnel database should be stored in a simple Python list, where each item in the list is one employee record. Additionally, each individual employee record should be stored in a Python tuple.

An employee record should consist of:

  • A unique ID number
  • Employee surname
  • Employee first name(s)
  • Job title
  • Full time (simply considered as yes or no)
  • Hourly rate (in pounds)
  • Hours per week

Write some code that allows the user to enter the details for a new employee record; remember to consider the data type for each item in the employee record. This code should also add the new employee record (Python tuple) to the personnel database (Python list).

Write some code that will display, in a suitable format, the database inventory- an output of all the names of employees (first name(s) and surnames) currently stored in the database.

Now write some code to add a repeating menu system to your program and therefore allow the user to select options to add further employee records and re-display the database inventory. The menu at this stage should look similar to the following:

Human Resources department
Personnel Database
+-+-+-+-+-+-+-+-+
a. Add a new employee record
b. Display all employees
c. Exit
Choose an option (a to c)

Add an option to your program to allow the user to search the database for an individual employee (by first name or surname) and display, in a suitable format, the full details of any matching records.

Add an option to your program to allow the user to delete an entry from the database (i.e. remove an employee record).

Add two more options to the main menu to allow the user to view a filtered list of all full-time employees and a filtered list of all part-time employees.

Finally add some code to display on the main menu how many employee records are currently stored in the database.

When you are finished you should have a program with a repeating menu system which looks similar to the following:

Human Resources department
Personnel Database
(Employee records: n)
+-+-+-+-+-+-+-+-+-+-+-+-+
a. Add a new employee record
b. Display all employees
c. Search for employee record (view details)
d. Delete an employee record
e. Show all full-time employees
f. Show all part-time employees
x. Exit
Choose an option (a to f) or x to Exit

All options should return to this menu when completed (apart from the last one).

Advanced Tasks

Add two further options to the main menu of the program to allow the user to:

  • View a list of all employee records sorted alphabetically (A-Z) by either surname or job title - the user should be given the choice.
  • View a list of all employees with a total weekly cost to the organisation greater than an entered value. The total weekly cost of each employee should be calculated as: hours per week x hourly rate using the data held in the database at the time.

Report

Produce a written report in a Microsoft Word document (or similar) to describe your program.

The report must contain the following sections:

  • Introduction - this should contain some background information, generally summarise the problem being solved in this task and demonstrate a clear understanding of the problems.
  • Solution Explanation - this is the main body of your report where you should describe your design and solution to the problem/task outlined in the introduction, and explain any key aspects to the program. You can also use this section to explain your design rationale for certain parts of your code (i.e., why have you done something in a certain way).
  • Testing - explain how you have tested your program, and if appropriate give some sample data and output examples from the program. There should be evidence of your program being tested given either in this section or in the appendix and referred to from this section.
  • Conclusion - use this section to evaluate your work (i.e. your solution to the problem described in the introduction), for example, what has worked well, what would you like to change next time.
  • Appendix - you should copy and paste your entire program code into this final section of the report.

Please note, any code pasted into the report (including the appendix) should use the Courier New (or a similar fixed-width) font to distinguish it from any other text; screenshots must not be used for source code.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.