-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyInteger.java
57 lines (41 loc) · 894 Bytes
/
MyInteger.java
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 MyInteger
{
// Data Fields
private int value;
//Construct class object
public MyInteger(int v)
{
v = value;
}
public int getInteger()
{
return value;
}
public boolean isEven()
{
boolean odd = false;
int even = value % 2;
if(value == even) return true; //help determining if variable is even by
else return false;
}
public boolean isOdd()
{
boolean even = false;
int odd = (value % 2); ////////////STUCK
if(value == odd) return true; //help determining if variable is even by
else return false;
}
public boolean isPrime()
{
return true; //help determining if variable is even by
}
/// SHOULD I HAVE LIKE ANOTHER 6 or so METHODS????????
public static int parseInt(char[] c)
{
return 0;
}
public static int parseInt(String s)
{
return 0;
}
}