-
Notifications
You must be signed in to change notification settings - Fork 0
/
qust2.txt
59 lines (50 loc) · 954 Bytes
/
qust2.txt
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
question
->create a class Employee with
-empId (int)
-empName (string)
-department (string)
-rating (double)
-compTransport (boolean)
->create a static method findUsingTransport accepts a list of objects
and a string deartment and return number of employees using company
transport
*return type :Integer
->create a static method findSecondHighest that accepts a list of objects
it should find the seond highest rating from the fiven list of employees and
these employes should not use the transport .print the name of that object in main
*return type: Object <Employee>
input format
------------
1001
Arjun
it
5
true
1002
preeti
it
4
true
1003
lina
admin
3.5
false
1004
akash
hw
4.5
false
1005
abin
sw
4.2
false
it
output
------
2
abin
explanation
2 ->only 2 objects that matches department it && using transport
abin ->second highest rating that not using transport