-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathData.java
72 lines (65 loc) · 1.54 KB
/
Data.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import java.util.Calendar;
import java.util.Date;
/**
* Write a description of class Data here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Data
{
// instance variables - replace the example below with your own
private String date;
private String checkInTime;
private String checkOutTime;
private boolean absent;
/**
* Constructor for objects of class Data
*/
public Data()
{
absent = false;
}
/**
*/
public void checkInTime()
{
// create a calendar instance, and get the date from that
// instance; it defaults to "today", or more accurately,
// "now".
Date today = Calendar.getInstance().getTime();
// store today's date
checkInTime = today.toString();
}
/**
*/
public void checkOutTime()
{
// create a calendar instance, and get the date from that
// instance; it defaults to "today", or more accurately,
// "now".
Date today = Calendar.getInstance().getTime();
// store today's date
checkOutTime = today.toString();
}
/**
*/
public void setAbsent()
{
absent = true;
}
/**
*/
public String getCheckInTime()
{
// create a calendar instance, and get the date from that
return checkInTime;
}
/**
*/
public String getCheckOutTime()
{
// create a calendar instance, and get the date from that
return checkOutTime;
}
}