-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDate.java
More file actions
46 lines (35 loc) · 678 Bytes
/
Date.java
File metadata and controls
46 lines (35 loc) · 678 Bytes
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
//Date.java
//created by: Daniel Myers
import java.io.Serializable;
public class Date implements Serializable{
private static final long serialVersionUID = -590353754866307587L;
private int month;
private int day;
private int year;
public Date(int m, int d, int y){
setMonth(m);
setDay(d);
setYear(y);
}
public void setMonth(int m){
month = m;
}
public int getMonth(){
return month;
}
public void setDay(int d){
day = d;
}
public int getDay(){
return day;
}
public void setYear(int y){
year = y;
}
public int getYear(){
return year;
}
public String toString(){
return (getMonth() + "/" + getDay() + "/" + getYear());
}
}