-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP242Class.java
More file actions
57 lines (54 loc) · 1.2 KB
/
P242Class.java
File metadata and controls
57 lines (54 loc) · 1.2 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
public class P242Class
{
private String mult = "";
private boolean let = false;
private int letter = 0;
private int let_vale = 0;
/////////////////////////////////////////////////////////////////
public float average (int x, int y)
{
return (x + y)/2;
}
/////////////////////////////////////////////////////////////////
public float average (int x, int y, int z)
{
return (x + y + z)/3;
}
/////////////////////////////////////////////////////////////////
public float average (int w, int x, int y, int z)
{
return (w + x + y + z)/4;
}
/////////////////////////////////////////////////////////////////
public String multiConcat (String x, int y)
{
for(int v = y; v > 0;v--)
{
mult+= x;
}
return mult;
}
/////////////////////////////////////////////////////////////////
public String multiConcat (String x)
{
mult+= x;
mult+= x;
return mult;
}
/////////////////////////////////////////////////////////////////
public boolean isAlpha (char y)
{
let = false;
letter = 'y';
let_vale = (int)y;
if(let_vale >= 65 && let_vale <= 90)
{
let = true;
}
else
{
let = false;
}
return let;
}
}