-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreserved.java
66 lines (53 loc) · 1.44 KB
/
reserved.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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package hotelgui;
import java.util.Date;
/**
*
*
*/
public class reserved {
private Date start, end; // assume these are set to something
private int userGUID;
/**
* Checks if the room is Available
* @param takes a date the user would like to reserve the room.
* Compares that date to the start and end dates
*/
public Boolean isAvailable(Date request)
{
return true;
}
/**
* Creates a reservation
* @param takes a start date and an end date for the reservation
* Takes a GUID to identify the user.
*/
public reserved(Date s, Date e, int GUID)
{
}
}
/*
public class reserved {
private Date start, end; // assume these are set to something
private int userGUID;
public Boolean isAvailable(Date request)
{
if(start.compareTo(request)>0 && end.compareTo(request)<0)
{
System.out.println("Start is " + (start.compareTo(request)>0) + " End is " + (end.compareTo(request)<0));
}
//return false;
return true;
}
public reserved(Date s, Date e, int GUID)
{
start = s;
end = e;
userGUID = GUID;
}
}
*/