Computer Science Project on Payroll Management System
Computer Science Project on Payroll Management System
Acknowledgment
Certificate
Introduction
Objective
Software Requirements
Hardware Requirements
Code Implementation
Output Screenshots
Conclusion
Bibliography
ACKNOWLEDGMENT
We, Gaurav and Mohit Pal, express our sincere
gratitude to our Computer Science teacher,
Niketa mam, for guiding us throughout this
project. Their encouragement and valuable
insights have been instrumental in the
successful completion of this project. We also
extend our heartfelt thanks to RANA PRATAP
SINDHI SARVODAYA VIDYALAYA for providing
us with the infrastructure and resources
required to complete this endeavor.
def calculate_salary(self):
hra = 0.2 * self.basic_salary # House Rent Allowance
da = 0.1 * self.basic_salary # Dearness Allowance
tax = 0.05 * self.basic_salary # Tax deduction
net_salary = self.basic_salary + hra + da - tax
return {
"HRA": hra,
"DA": da,
"Tax": tax,
"Net Salary": net_salary
}
# Input Details
num_employees = int(input("Enter the number of employees: "))
employees = []
for _ in range(num_employees):
emp_id = input("Enter Employee ID: ")
name = input("Enter Employee Name: ")
basic_salary = float(input("Enter Basic Salary: "))
employees.append(Employee(emp_id, name, basic_salary))
# Display Salaries
for emp in employees:
print(f"\nEmployee ID: {emp.emp_id}")
print(f"Name: {emp.name}")
salary_details = emp.calculate_salary()
for key, value in salary_details.items():
print(f"{key}: {value:.2f}")
CODE OUTPUT
an example of program execution and its corresponding output for the
provided Payroll Management System:
Example Input:
Enter the number of employees: 2
Enter Employee ID: E001
Enter Employee Name: John Doe
Enter Basic Salary: 50000
Enter Employee ID: E002
Enter Employee Name: Jane Smith
Enter Basic Salary: 60000
Example Output:
Employee ID: E001
Name: John Doe
HRA: 10000.00
DA: 5000.00
Tax: 2500.00
Net Salary: 62500.00
Python Documentation: