-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStore.java
43 lines (36 loc) · 1.3 KB
/
Store.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
public class Store {
public String storeName;
public String address1;
public String address2;
public String city;
public String state;
public int zip;
public float distance;
public String id;
public double latitude;
public double longitude;
public DailyHours[] hours; // 0-7 <=> Sunday-Saturday
public String url; // URL of weekly ad
public int divisionNumber; // May be un-needed
public int storeNumber; // May be un-needed
public Store() {}
public void save() {}
public void load() {}
/* isOpen()
minutes must be between 0 (now) and 60*24*7 (one week) otherwise will throw error
isOpen(0) returns true if store is open now
isOpen(15) returns true if store is open in 15 minutes
isOpen(60*2) returns true if store is open in 2 hours
*/
public boolean isOpen(int minutes) {
return false;
}
private class DailyHours {
int from; // 800 is 8:00am
int to; // 2200 is 10:00pm
public DailyHours(int from, int to) {
this.from = from;
this.to = to;
}
}
}