-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.java
More file actions
162 lines (130 loc) · 4.06 KB
/
Person.java
File metadata and controls
162 lines (130 loc) · 4.06 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
package qldv;
import java.util.Scanner;
public class Person {
private String name;
private int age;
private String gender;
private String add;
private String phoneNum;
private String homeTown;
private String code;
private int coSalary;
private int dayofWork;
protected String setial;
public Person(String name, int age, String gender, String add, String phoneNum, String homeTown,
String code, int coSalary, int dayofWork, String setial){
this.name= name;
this.age= age;
this.gender=gender;
this.add= add;
this.phoneNum= phoneNum;
this.homeTown = homeTown;
this.code=code;
this.coSalary=coSalary;
this.dayofWork = dayofWork;
this.setial = setial;
}
Person(){}
public String getSetial() {
return setial;
}
public void setSetial(String setial) {
this.setial = setial;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getAdd() {
return add;
}
public void setAdd(String Add) {
this.add = add;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public String getHomeTown() {
return homeTown;
}
public void setHomeTown(String homeTown) {
this.homeTown = homeTown;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public int getCoSalary() {
return coSalary;
}
public void setCoSalary(int coSalary) {
this.coSalary = coSalary;
}
public int getDayofWork() {
return dayofWork;
}
public void setDayofWork(int dayofWork) {
this.dayofWork = dayofWork;
}
public void Information(){
Scanner sc = new Scanner(System.in);
System.out.print("Họ và tên: ");
name = sc.nextLine();
System.out.print("Tuổi: ");
age = Integer.parseInt(sc.nextLine());
System.out.print("Giới tính: ");
gender = sc.nextLine();
System.out.print("Địa chỉ: ");
add = sc.nextLine();
System.out.print("SĐT: ");
phoneNum = sc.nextLine();
System.out.print("Quê quán: ");
homeTown = sc.nextLine();
System.out.print("Hệ số lương: ");
coSalary = Integer.parseInt(sc.nextLine());
System.out.print("Ngày làm việc ");
dayofWork = Integer.parseInt(sc.nextLine());
}
public void Salary(){
double Salary = this.getDayofWork() * this.getCoSalary();
System.out.println("=> Lương: "+ Salary);
System.out.println("\n");
}
public void showInformation(){
System.out.println("\n");
System.out.println("**********************************\n");
System.out.println("Mã cán bộ: "+this.setial);
System.out.println("Họ và tên: "+ this.name);
System.out.println("Tuổi: "+ this.age);
System.out.println("Giới tính: "+ this.gender);
System.out.println("Địa chỉ: "+ this.add);
System.out.println("SĐT: "+ this.phoneNum);
System.out.println("Quê quán: "+ this.homeTown);
System.out.println("Hệ số lương: "+ this.coSalary);
System.out.println("Ngày làm việc "+ this.dayofWork);
}
public void Run(){
Information();
showInformation();
Salary();
}
}