-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterface.java
More file actions
44 lines (43 loc) · 1.05 KB
/
Copy pathInterface.java
File metadata and controls
44 lines (43 loc) · 1.05 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
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: "+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 Test11
{
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 :+trainee.jobid");
}
}