forked from ishanjogalekar/Java-Programs
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8.TestResult.java
More file actions
Latest commit
70 lines (69 loc) · 2.61 KB
/
Copy path8.TestResult.java
File metadata and controls
70 lines (69 loc) · 2.61 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
/*Question -
Design a class called Participants with properties like Name, Phno,
Branch and University, TestResult_Classification[L1,L2,L3,L4,L5]. Create a
static method to display a message as follows based on the selection
criteria,
(i) If student test result classification is L1, congratulate the student
and inform that he/she has been selected for both Full time
intership as well as Full time job
(ii) If student test result classification is L2 or L3, inform the student
that he/she has been selected for Full time intership and Job
may be offered based on intership Performance.
(iii) If student test result classification is L4 or L5, inform that he/she
has been selected for Part time intership of 21 days.
Create atleast three Participants objects of array and then invoke static
method to display the message.
Note: Don’t use if statement for conditional check, instead use Switch
Case statement.*/
//Code-
importjava.util.Scanner;
publicclassparticipants {
publicstaticvoidmain(String[] args) {
selectionobj[] = newselection[3] ;
obj[0]=newselection();
obj[0].getData();
obj[1]=newselection();
obj[1].getData();
obj[2]=newselection();
obj[2].getData();
}
}
classselection {
staticvoidgetData() {
Scanners = newScanner(System.in);
System.out.println("Enter Your Name:");
StringN = s.nextLine();
System.out.println("Enter Your phone no:");
StringP = s.nextLine();
intn = P.length();
if (n != 10) {
System.out.println("Enter valid phone no");
}
else {
System.out.println("Enter Your Branch and University");
StringB = s.nextLine();
StringU = s.nextLine();
System.out.println("Enter Condition as:");
StringL = s.next();
switch (L) {
case"L1":
System.out.println("Congrats " + N + " You selected for Full time internship and Full time job");
break;
case"L2":
System.out.println("Congrats " + N + " You selecte for selected for Full time internship and Job may be offered based on internship Performance. ");
break;
case"L3":
System.out.println("Congrats " + N + " You selected for selected for Full time internship and Job may be offered based on internship Performance. ");
break;
case"L4":
System.out.println("Congrats " + N + " You selected for Part time intership of 21 days.");
break;
case"L5":
System.out.println("Congrats " + N + " You selected for Part time intership of 21 days.");
break;
default:
System.out.println("Invalid");
}
}
}
}