-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManager.java
More file actions
33 lines (26 loc) · 723 Bytes
/
Copy pathManager.java
File metadata and controls
33 lines (26 loc) · 723 Bytes
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
package inheritanceExample;
public class Manager extends Worker {
String workSpelization = "UI/UX Developer";
String deparement = "Desiginer";
void assign() {
sName = "Gaurav";
age = 22;
phoneNo = 95523604;
address = "At Post Makodi";
salary = 70000;
}
void displayData() {
System.out.println("Name : "+sName);
System.out.println("Age : "+age);
System.out.println("Phone Number : "+phoneNo);
System.out.println("Address : "+address);
System.out.println("Work Spelization : "+workSpelization);
System.out.println("Deparement : "+deparement);
}
public static void main(String[] args) {
Manager obj = new Manager();
obj.assign();
obj.displayData();
obj.displaySalary();
}
}