-
Notifications
You must be signed in to change notification settings - Fork 0
/
PayrollManagementSystem.java
109 lines (87 loc) · 6.3 KB
/
PayrollManagementSystem.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import java.util.Scanner;
import javax.swing.plaf.synth.SynthOptionPaneUI;
import org.omg.CORBA.StringSeqHelper;
class Employee {
private String name;
private int id;
private double salary;
public Employee(String name, int id, double salary) {
this.name = name;
this.id = id;
this.salary = salary;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
public void displayEmployeeDetails() {
System.out.println("Employee ID: " + id);
System.out.println("Employee Name: " + name);
System.out.println("Employee Salary: " + salary);
}
}
public class PayrollManagementSystem {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println();
System.out.println("██████╗ █████╗ ██╗ ██╗██████╗ ██████╗ ██╗ ██╗ ");
System.out.println("██╔══██╗██╔══██╗╚██╗ ██╔╝██╔══██╗██╔═══██╗██║ ██║ ");
System.out.println("██████╔╝███████║ ╚████╔╝ ██████╔╝██║ ██║██║ ██║ ");
System.out.println("██╔═══╝ ██╔══██║ ╚██╔╝ ██╔══██╗██║ ██║██║ ██║ ");
System.out.println("██║ ██║ ██║ ██║ ██║ ██║╚██████╔╝███████╗███████╗");
System.out.println("╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝");
System.out.println("");
System.out.println(
"\t███╗ ███╗ █████╗ ███╗ ██╗ █████╗ ██████╗ ███████╗███╗ ███╗███████╗███╗ ██╗████████╗ ");
System.out.println(
"\t████╗ ████║██╔══██╗████╗ ██║██╔══██╗██╔════╝ ██╔════╝████╗ ████║██╔════╝████╗ ██║╚══██╔══╝ ");
System.out.println(
"\t██╔████╔██║███████║██╔██╗ ██║███████║██║ ███╗█████╗ ██╔████╔██║█████╗ ██╔██╗ ██║ ██║ ");
System.out.println(
"\t██║╚██╔╝██║██╔══██║██║╚██╗██║██╔══██║██║ ██║██╔══╝ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ ");
System.out.println(
"\t██║ ╚═╝ ██║██║ ██║██║ ╚████║██║ ██║╚██████╔╝███████╗██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ ");
System.out.println(
"\t╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ");
System.out.println();
System.out.println("\t \t \t \t \t \t \t \t \t ███████╗██╗ ██╗███████╗████████╗███████╗███╗ ███╗");
System.out.println("\t \t \t \t \t \t \t \t \t ██╔════╝╚██╗ ██╔╝██╔════╝╚══██╔══╝██╔════╝████╗ ████║");
System.out.println("\t \t \t \t \t \t \t \t \t ███████╗ ╚████╔╝ ███████╗ ██║ █████╗ ██╔████╔██║");
System.out.println("\t \t \t \t \t \t \t \t \t ════██║ ╚██╔╝ ╚════██║ ██║ ██╔══╝ ██║╚██╔╝██║");
System.out.println("\t \t \t \t \t \t \t \t \t ╚════██║ ╚██╔╝ ╚════██║ ██║ ██╔══╝ ██║╚██╔╝██║");
System.out.println("\t \t \t \t \t \t \t \t \t ███████║ ██║ ███████║ ██║ ███████╗██║ ╚═╝ ██║");
System.out.println("\t \t \t \t \t \t \t \t \t ╚══════╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝");
System.out.println(
"_________________________________________________________________________________________________________________________");
System.out.println("\n \t Enter Employee Details");
System.out.print("Enter employee name: ");
String name = scanner.nextLine();
System.out.print("Enter employee ID: ");
int id = scanner.nextInt();
System.out.print("Enter employee salary: ");
double salary = scanner.nextDouble();
Employee employee = new Employee(name, id, salary);
System.out.println("\nEmployee Details:");
employee.displayEmployeeDetails();
System.out.print("\nEnter new salary for the employee: ");
double newSalary = scanner.nextDouble();
employee.setSalary(newSalary);
System.out.println("\nUpdated Employee Details:");
employee.displayEmployeeDetails();
scanner.close();
}
}