Repository navigation
Expand file tree
/
Copy pathMethodPractice2.java
More file actions
65 lines (57 loc) · 1.67 KB
/
Copy pathMethodPractice2.java
File metadata and controls
65 lines (57 loc) · 1.67 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
package practice2;
public class MethodPractice2 {
public static void main(String[] args) {
System.out.println("A patient came at hospital named " + patientName + ", doctor gave her " + medicineDose + " doses of medicine " +
" and she was marked patient type " + patientType + " having severe condition. ");
MethodPractice2 mc1 = new MethodPractice2();
System.out.println( mc1.clientName + " is a "+ mc1.clientType + " type client and he submitted " + mc1.projectNumber + " projects. ");
work1();
work2();
work3();
work4();
work5();
mc1.type1();
mc1.type2();
mc1.type3();
mc1.type4();
mc1.type5();
}
static String patientName = "Rose";
String clientName = "Alex";
static int medicineDose = 9;
int projectNumber = 12;
static char patientType = 'P';
char clientType = 'C';
static boolean conditionSevere = true;
boolean clientImportance = true;
public static void work1 () {
System.out.println("Severe patients are priority");
}
public static void work2 () {
System.out.println("Doctors were available");
}
public static void work3 () {
System.out.println("Doctors give medicine");
}
public static void work4 () {
System.out.println("Medicine should be taken timely");
}
public static void work5 () {
System.out.println("Patients are treated nicely");
}
public void type1 () {
System.out.println("Clients are important");
}
public void type2 () {
System.out.println("Company works for them");
}
public void type3 () {
System.out.println("Clients are demanding");
}
public void type4 () {
System.out.println("Clients have objections");
}
public void type5 () {
System.out.println("Delivery should be in time");
}
}