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