-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoop(task_4).java
More file actions
78 lines (55 loc) · 1.23 KB
/
Copy pathoop(task_4).java
File metadata and controls
78 lines (55 loc) · 1.23 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
class PSLteams{
private String teamName;
private int NoOfmatchesPlayed;
private int NoOfmatchesWon;
private int NoOfmatchesLost;
private int NoOfmatchesPlayed;
private int Rank;
private int status;
PSLteams(String teamName, int NoOfmatchesPlayed,int NoOfmatchesWon,int NoOfMatchesLost){
this.teamName= team;
this.NoOfMatchesPlayed= played;
this.NoOfMatchesWon= Won;
this.NoOfMatchesLost= Lost;
this.Rank=rank;
this.status=status;
}
void PslMatch(int status){
System.out.println("team has"+status+"the match");
}
public void PointsTable(){
System.out.println("Team name : "+ team);
int count = played;
System.out.printf("Team has played %d matches",count++);
int count1 = Lost;
int i;
for(i=1;i>=count;i++)
{
if(status == 0)
{
System.out.printf("team has lost %d",count1++);
}
else{
System.out.printf("team has lost 0 matches");
}
}
int count2 = Won;
for(i=1;i >= count;i++)
{
if(status == 1)
{
System.out.printf("team has won %d",count2++);
}
else{
System.out.printf("team has won 0 matches");
}
}
}
}
class TestPSL2019{
public static void main(String[] args)
{
PSLteams KarachiKings=new PSLteams("karachiKings",1,1,0,1);
KarachiKings.PointsTable();
}
}