-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLog.java
More file actions
83 lines (79 loc) · 2.64 KB
/
Log.java
File metadata and controls
83 lines (79 loc) · 2.64 KB
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
73
74
75
76
77
78
79
80
81
82
83
/**
* Write a description of class Log here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Log
{
// instance variables - replace the example below with your own
private String LP; // text versions licences plate number
private int VAP; // vehicle access pas
private String time;// time of entry
private String pointOfEntry; // point of enter use motorist use to gian access to the campus
private String pointOfExit; // point of exit use motorist use to leaves the campus
private String timeofExit;//time of eixt
private String parkinglotuse;// the parking lots enter by the motorist while on the campus
private String timeplentry; //time of entry to the parking lot
private String timeplexit;//time of exit to the parking lot
/**
* Constructor for objects of class Log for point of entry
*/
public Log(String LP, int VAP,String time,String pointOfEntry)
{
this.LP=LP;
this.VAP = VAP ;
this.time= time;
this.pointOfEntry =pointOfEntry;
}
/**
* create a log for point of exit
*/
public Log(String LP, int VAP ,String time,String pointOfEntry,String pointOfExit,String timeofExit)
{
this.LP=LP;
this.VAP = VAP ;
this.time= time;
this.pointOfEntry =pointOfEntry;
this.pointOfExit =pointOfExit;
this.timeofExit= timeofExit;
}
/**
* create a Master log with information from point of enter,exit and the parkinglots
*/
public Log(String LP, int VAP ,String time,String pointOfEntry,String pointOfExit,String timeofExit,String parkinglotuse,String timeplentry,String timeplexit)
{
this.LP=LP;
this.VAP = VAP ;
this.time= time;
this.pointOfEntry =pointOfEntry;
this.pointOfExit =pointOfExit;
this.timeofExit= timeofExit;
this.parkinglotuse=parkinglotuse;
this.timeplentry=timeplentry;
this.timeplexit=timeplexit;
}
public void setplEnter(String parkinglotuse,String timeplentry)
{
this.parkinglotuse=parkinglotuse;
this.timeplentry=timeplentry;
}
public void setplExit( String timeplexit)
{
this.timeplexit=timeplexit;
}
/**
* store log information.
*/
public String toStirng()
{
return(LP+ VAP + time + pointOfEntry + pointOfExit + timeofExit + parkinglotuse + timeplentry + timeplexit);
}
/**
* allow user to view log.
*/
public String Viewlog()
{
return toString();
}
}