Files
louiscklaw dc9c9468ce update,
2025-02-01 02:00:51 +08:00

4.5 KiB

tags
tags
python
ITP3915

daniel_jo

Extracted

REQUIREMENT

  • This Employee Management System has 5 functions.
    • Users are allowed to
      • display all employee information,
      • display company statistics,
      • add and
        • To add an employee record, user is required to input employee's name, salary and department.
        • Employee ID should be auto generate follow along with the last employee's record ID
      • remove an employee,
        • To remove an employee record, user is required to input the employee's id
      • update employee salary by specify employee's id
        • To update an employee salary, user is required to input the employee's id and salary.
      • All employee information should be displayed for user as a reference when user perform remove employee and update employee's salary action
      • The list of all employee information is stored in a text file named "employee_list.txt"

CHECKLIST

DELIVERY

- `•	Well-commented source code.`
  - SYSTEM IMPLEMENTATION

- `•	A test plan showing the evidence of testing.`
  - validation of input
  - error control
  - Prepare a word document
    - with a number of test cases
      - showing different inputs for different situations
        that your program may encounter and how your program responses to show the capability of your program.

  - `8.	Submit all your works (in a zip file under the name of your student ID — e.g. 229999999.zip)`


- test case (doc)

NOTES:

9.
Each student will be required to conduct an assignment demonstration during laboratory class to show the system and walk through all the functions.
The date of the demonstration will be after the assignment submission and is to be confirmed later (It should be the next lab session just after the submission of assignment normally). Zero Marks will be given if students do not perform any assignment demonstration.
https://books.agiliq.com/projects/essential-python-tools/en/latest/linters.html
  1. Your programs must follow the style guide stated in PEP8 — Style Guide for Python Code published by python.org. https://www.python.org/dev/peps/pep-0008/. Marks may be deducted if the style guide is not followed.

Marks Distribution

  • System Implementation (70%)
    • Validation on the input data and display appropriate error messages (20%)
  • Test plan (10%)

error output

ERROR_ID_NOT_FOUND = 1
ERROR_ID_MAILFORMED = 2
ERROR_INPUT_NAME_SHOULD_NOT_CONTAIN_DIGIT = 3
ERROR_INPUT_SALARY =4
ERROR_INPUT_DEPARTMENT = 5
ERROR_INPUT_ID = 6
ERROR_MENU_INPUT_IS_NOT_DIGIT_ONLY = 7
ERROR_MENU_INPUT_INVALID_FUNCTION_NUMBER = 8

test main menu

Test plan fields

  • ID
  • Test Case Name
  • Procedure
  • Expected Output
  • Screen Dump
  • Result
ID Test Case Name Procedure Expected Output Screen Dump Result
Display all employees in the system 1. Start program.
2. input 1 for display all employee
All employees' information including their employee ID, name, salary and department should be displayed
Pass/ Fail

Main menu

  • []valid input
    • []1,2,3,4,5
      • []display function
    • []enter
      • []exitting
  • []invalid input
    • []0, 6, $, !

Display all employee

  • []functional

Add an employee

  • []valid input
  • []invalid input
    • []id not found
    • []name invalid
    • []salary invalid
    • []department invalid
  • functional
    • cancelling

Remove an employee

  • []valid input
  • []invalid input
  • []id not found
  • []functional
    • []cancelling

Update employee salary

  • []valid input
  • []invalid input
  • []id not found
  • []salary invalid
  • []functional
    • []cancelling

Display company statistics

  • []functional
    • []highest
    • []lowest
    • []average