-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInterface.java
44 lines (36 loc) · 1.12 KB
/
Interface.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
import java.util.Scanner;
interface Human {
final int jobId = 1050;
void learn(String str);
void work();
}
interface Recruitment {
void screening(int score);
}
class Programmer implements Human, Recruitment {
public void learn(String str) {
System.out.println("My trained area is : " + str);
}
public void screening(int score) {
System.out.println("Test Score : " + score);
}
public void work() {
System.out.println("Selected to the Role Development ");
}
}
public class Interface {
public static void main(String[] args) {
Programmer trainee = new Programmer();
Scanner sc = new Scanner(System.in);
System.out.println("Enter your trained area");
String str = sc.nextLine();
System.out.println("Enter Test Score");
int score = sc.nextInt();
System.out.println("----ABOUT MY PLACEMENT----");
trainee.learn(str);
trainee.screening(score);
trainee.work();
System.out.println("My Job's ID is : " + Human.jobId);
sc.close();
}
}