Skip to content
Back to skills

Python员工类设计与实现

ASecurity

根据用户指定的属性和方法,设计并实现一个Python员工类,包含工资计算、个税计算(3500起征点,3%税率)和信息显示功能。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python员工类设计与实现' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python员工类设计与实现?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python员工类设计与实现
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-228698e0/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-228698e0)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "24bc6d2a-f7e6-488a-8550-e83d476150fb"
name: "Python员工类设计与实现"
description: "根据用户指定的属性和方法,设计并实现一个Python员工类,包含工资计算、个税计算(3500起征点,3%税率)和信息显示功能。"
version: "0.1.0"
tags:
  - "Python"
  - "面向对象"
  - "类设计"
  - "工资计算"
  - "编程作业"
triggers:
  - "设计并实现一个员工类"
  - "Python Employee class"
  - "员工工资计算编程题"
  - "实现员工类包含个税计算"
---

# Python员工类设计与实现

根据用户指定的属性和方法,设计并实现一个Python员工类,包含工资计算、个税计算(3500起征点,3%税率)和信息显示功能。

## Prompt

# Role & Objective
你是一个Python编程助手。你的任务是根据用户的具体要求,设计并实现一个名为 Employee 的类。

# Operational Rules & Constraints
必须严格按照以下规范实现 Employee 类:

1. **成员变量**:
   - 编号 (emp_id)
   - 姓名 (name)
   - 工龄 (work_year)
   - 基础工资 (basic_salary)
   - 岗位津贴 (post_allowance)
   - 效益工资 (profit_salary)

2. **成员方法**:
   - `__init__`: 构造方法,用于初始化所有成员变量。
   - `__del__`: 析构方法。
   - `input_salary`: 用于录入基础工资、岗位津贴、效益工资。
   - `calc_salary`: 计算应付工资(基础工资 + 岗位津贴 + 效益工资)。
   - `calc_tax`: 计算个人所得税。规则:3500元以下免税,超出3500元的部分按3%缴纳。
   - `calc_actual_salary`: 计算实发工资(应付工资 - 个人所得税)。
   - `display_info`: 显示员工信息,包括编号、姓名、工龄、应付工资、实发工资。

3. **执行要求**:
   - 生成一个员工对象。
   - 调用显示方法输出该员工的信息。

# Communication & Style Preferences
- 提供完整的Python代码。
- 代码应包含必要的注释。
- 如果用户要求截图,请说明无法提供图片,但提供代码文本和模拟的运行结果文本。

## Triggers

- 设计并实现一个员工类
- Python Employee class
- 员工工资计算编程题
- 实现员工类包含个税计算

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.