-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeam.java
More file actions
101 lines (70 loc) · 1.83 KB
/
Copy pathTeam.java
File metadata and controls
101 lines (70 loc) · 1.83 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package JavaSessions;
import java.util.ArrayList;
public class Team {
// WAF : pass the team name
// return : the list of devices ---> ArrayList<String>
public ArrayList<String> getDevicesList(String teamName) {
System.out.println("team name is : " + teamName);
ArrayList<String> devicesList = new ArrayList<String>();
if (teamName.equals("QA")) {
devicesList.add("iPhone X");
devicesList.add("iPhone 7");
devicesList.add("Samsung 8");
}
else if (teamName.equals("Dev")) {
devicesList.add("iPhone 12");
devicesList.add("iPhone 8");
devicesList.add("Samsung 7");
}
else if (teamName.equals("DevOps")) {
devicesList.add("iPhone plus 12");
}
else {
System.out.println("team is not found..." + teamName);
}
return devicesList;
}
//WAF: input: browserName(String)
//return: void
public void launchBrowser(String browserName) {
switch (browserName.toLowerCase()) {
case "chrome":
System.out.println("launch chrome");
break;
case "firefox":
System.out.println("launch ff");
break;
case "safari":
System.out.println("launch safari");
break;
default:
System.out.println("please pass the right browser name: " + browserName);
break;
}
}
//WAF: input param: StudentName(String)
//return: static array: Object Array
public Object[] getStudentInfo(String name) {
System.out.println("student name is : " + name);
Object info[] = new Object[3];
if(name.equals("Karthik")) {
info[0] = "Karthik Sharma";
info[1] = 10;
info[2] = 'A';
}
else if(name.equals("Sonu")) {
info[0] = "Sonu Gupta";
info[1] = 11;
info[2] = 'B';
}
else if(name.equals("Ravi")) {
info[0] = "Ravi K";
info[1] = 12;
info[2] = 'C';
}
else {
System.out.println("student name is not found..." + name);
}
return info;
}
}