-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExit.java
More file actions
40 lines (38 loc) · 854 Bytes
/
Exit.java
File metadata and controls
40 lines (38 loc) · 854 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
/**
* Write a description of class Exit here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Exit
{
// instance variables - replace the example below with your own
private Log log;
private VAP vap;
private Entrance entrance;
/**
* Constructor for objects of class Exit
*/
public Exit(Log log,VAP vap)
{
this.log=log;
this.vap=vap;
}
public void getEntrance(Entrance e)
{
this.entrance=e;
}
public void match(VAP vap)
{
String x=entrance.getLP(vap);
String y= vap.getLP();
if (y.equals(x))
{
vap=null;
}
else
{
System.out.println("error VPA does not match Licnecs plate number");
}
}
}